diff options
author | pixel <pixel> | 2003-09-24 14:21:58 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-09-24 14:21:58 +0000 |
commit | 82cd864169e0f3915927d8dcf46045a95d0a0365 (patch) | |
tree | f30f0de0accdc428954a856e0354c33dcc47ec05 /PE | |
parent | c1727f55279122d155a639809cc021fc88005867 (diff) |
Grmf
Diffstat (limited to 'PE')
-rw-r--r-- | PE/Makefile | 53 | ||||
-rw-r--r-- | PE/compil.lex | 14 | ||||
-rw-r--r-- | 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<CLOSE>\n" { - yputc(0xff); -} - -"<UNK "[[:xdigit:]]{2}">" { +"<UNK "[[:xdigit:]]+">" { int d = strtoul(yytext + 5, NULL, 16); yputc(d); } @@ -49,6 +45,8 @@ yputc(d); } +"\n<CLOSE>\n" yputc(0xff); +"<CLOSE>\n" { yputc(0xf7); yputc(0xff); } "<AYA>" yputc(0xfa); "\n<TCLOSE>\n" yputc(0xf9); "<PAUSE>\n" yputc(0xf8); @@ -57,6 +55,10 @@ "<ae>" yputc(0x5c); "<oe>" 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 |