From 82cd864169e0f3915927d8dcf46045a95d0a0365 Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 24 Sep 2003 14:21:58 +0000 Subject: Grmf --- PE/Makefile | 53 ++++++++++++++++++++++++++--------------------------- PE/compil.lex | 14 ++++++++------ PE/nmakefile | 34 +++++++++++++++++----------------- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/PE/Makefile b/PE/Makefile index d12149e..2d404ab 100644 --- a/PE/Makefile +++ b/PE/Makefile @@ -1,27 +1,26 @@ -#!/usr/bin/make -f - -CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes -DHAVE_ZLIB `baltisot-config --cflags` -CXX=g++ -CC=gcc -LEX=flex -l - -LIBS=-lz -#-lefence -LDFLAGS=${LIBS} `baltisot-config --libs` -#`pkg-config --libs glib-2.0` - -TARGET = reinsert compil extract extract-various extract-rooms - -all: ${TARGET} - -reinsert: reinsert.o ../includes/cdutils.h ../includes/yazedc.h ../lib/lib.a Makefile - ${CXX} ${LDFLAGS} reinsert.o ../lib/lib.a -o reinsert - -compil: compil.o - ${CC} ${LDFLAGS} compil.o -o compil - -compil.c: compil.lex - ${LEX} -ocompil.c compil.lex - -clean: - rm -f *.o ${TARGET} compil.c +#!/usr/bin/make -f + +CPPFLAGS=-Wall -g -O3 -mcpu=i686 -I../includes -DHAVE_ZLIB `baltisot-config --cflags` +CXX=g++ +CC=gcc +LEX=flex -l + +LIBS=-lz -lefence +LDFLAGS=${LIBS} `baltisot-config --libs` +#`pkg-config --libs glib-2.0` + +TARGET = reinsert compil extract extract-various extract-rooms + +all: ${TARGET} + +reinsert: reinsert.o ../includes/cdutils.h ../includes/yazedc.h ../lib/lib.a Makefile + ${CXX} ${LDFLAGS} reinsert.o ../lib/lib.a -o reinsert + +compil: compil.o + ${CC} ${LDFLAGS} compil.o -o compil + +compil.c: compil.lex + ${LEX} -ocompil.c compil.lex + +clean: + rm -f *.o ${TARGET} compil.c diff --git a/PE/compil.lex b/PE/compil.lex index 91fe11d..76d3dbe 100644 --- a/PE/compil.lex +++ b/PE/compil.lex @@ -10,11 +10,7 @@ yputc(d); } -"\n\n" { - yputc(0xff); -} - -"" { +"" { int d = strtoul(yytext + 5, NULL, 16); yputc(d); } @@ -49,6 +45,8 @@ yputc(d); } +"\n\n" yputc(0xff); +"\n" { yputc(0xf7); yputc(0xff); } "" yputc(0xfa); "\n\n" yputc(0xf9); "\n" yputc(0xf8); @@ -57,6 +55,10 @@ "" yputc(0x5c); "" yputc(0x5d); +"<"[^>]*">" { + fprintf(stderr, "Commande inconnue ligne %i: %s\n", yylineno, yytext); +} + . { int i, trouve = 0; for (i = 0; i <= MAXCHAR; i++) { @@ -67,7 +69,7 @@ } if (!trouve) { - fprintf(stderr, "Caractère inconnu ligne %i: %s\n", yylineno, yytext); + fprintf(stderr, "Caractère inconnu ligne %i: %s\n", yylineno, yytext); } } diff --git a/PE/nmakefile b/PE/nmakefile index ceca938..8c109ca 100644 --- a/PE/nmakefile +++ b/PE/nmakefile @@ -1,17 +1,17 @@ -_CCFLAGS = /I ..\includes /I ..\generic\include /I ..\..\zlib -!IFDEF DEBUG -_LIBS = "..\MSVC\Baltisot - generic\Debug\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Debug\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib -!ELSE -_LIBS = "..\MSVC\Baltisot - generic\Release\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Release\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib -!ENDIF - -!include ..\MSVC\Tools\master.mak - -#------------------------------------------------------------------ - -TARGETS = extract.exe extract-rooms.exe extract-various.exe reinsert.exe compil.c compil.exe compilall.exe - -all : $(TARGETS) - -clean : - -del /Q $(TARGETS) *.ilk *.pdb *.obj +_CCFLAGS = /I ..\includes /I ..\generic\include /I ..\..\zlib +!IFDEF DEBUG +_LIBS = "..\MSVC\Baltisot - generic\Debug\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Debug\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib +!ELSE +_LIBS = "..\MSVC\Baltisot - generic\Release\Baltisot - generic.lib" "..\MSVC\PSX-Bundle - library\Release\PSX-Bundle - library.lib" ..\..\zlib\dll32\zlib.lib ..\..\zlib\static32\zlibstat.lib +!ENDIF + +!include ..\MSVC\Tools\master.mak + +#------------------------------------------------------------------ + +TARGETS = extract.exe extract-rooms.exe extract-various.exe reinsert.exe compil.c compil.exe compilall.exe + +all : $(TARGETS) + +clean : + -del /Q $(TARGETS) *.ilk *.pdb *.obj -- cgit v1.2.3