diff options
author | Pixel <Pixel> | 2002-07-21 11:52:56 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2002-07-21 11:52:56 +0000 |
commit | cbee971a2e8929924f63535d174637106620eae3 (patch) | |
tree | 6ea7249ad3996c6e750deb9814991e9005887449 | |
parent | 6528f07c516efe4d3b344f01740067878d5d9a43 (diff) |
Prlorf
-rwxr-xr-x | Makefile | 28 | ||||
-rwxr-xr-x | MegamanX5/Makefile | 4 | ||||
-rwxr-xr-x | VP/Makefile | 16 | ||||
-rwxr-xr-x | Xenogears/Makefile | 20 | ||||
-rw-r--r-- | generic/Buffer.cpp | 2 | ||||
-rw-r--r-- | generic/Exceptions.cpp | 2 | ||||
-rw-r--r-- | generic/fileutils.cpp (renamed from lib/fileutils.cpp) | 0 | ||||
-rw-r--r-- | generic/generic.cpp (renamed from lib/generic.cpp) | 0 | ||||
-rw-r--r-- | includes/generic.h | 8 | ||||
-rwxr-xr-x | lib/Makefile | 7 | ||||
-rw-r--r-- | psxdev/Makefile | 7 |
11 files changed, 56 insertions, 38 deletions
@@ -12,29 +12,29 @@ all: subdirs ${TARGET} subdirs: for d in ${SUBDIRS} ; do make -C $$d || exit -1 ; done -lzss: lib/lzss.o includes/lzss.h lib/generic.o includes/generic.h includes/fileutils.h lib/fileutils.o lzss-main.o Makefile - ${CXX} ${LDFLAGS} -DLZSS_MAIN lib/lzss.o lib/generic.o lib/fileutils.o lzss-main.o -o lzss +lzss: includes/lzss.h includes/generic.h includes/fileutils.h lzss-main.o generic/generic.a lib/lib.a Makefile + ${CXX} ${LDFLAGS} -DLZSS_MAIN lzss-main.o lib/lib.a generic/generic.a -o lzss dlzss: lzss Makefile ln -fs lzss dlzss -yazedc: lib/yazedc.o lib/crctables lib/crctable.out yazedc-main.o Makefile - ${CXX} ${LDFLAGS} lib/yazedc.o yazedc-main.o -DMAIN -o yazedc +yazedc: yazedc-main.o lib/lib.a Makefile + ${CXX} ${LDFLAGS} yazedc-main.o lib/lib.a -DMAIN -o yazedc -cd-tool: cd-tool.o lib/cdutils.o includes/cdutils.h lib/fileutils.o includes/fileutils.h lib/generic.o includes/generic.h lib/yazedc.o includes/yazedc.h Makefile - ${CXX} ${LDFLAGAS} cd-tool.o lib/cdutils.o lib/fileutils.o lib/yazedc.o lib/generic.o -o cd-tool +cd-tool: includes/cdutils.h includes/fileutils.h includes/generic.h includes/yazedc.h cd-tool.o Makefile + ${CXX} ${LDFLAGAS} cd-tool.o lib/lib.a generic/generic.a -o cd-tool -dte-tool: lib/dteutils.o includes/generic.h lib/generic.o lib/fileutils.o includes/fileutils.h includes/dte.h dtemain.o Makefile - ${CXX} ${LDFLAGS} lib/dteutils.o lib/generic.o lib/fileutils.o dtemain.o -o dte-tool +dte-tool: includes/generic.h includes/fileutils.h includes/dte.h dtemain.o lib/lib.a generic/generic.a Makefile + ${CXX} ${LDFLAGS} dtemain.o lib/lib.a generic/generic.a -o dte-tool -str-player: str-player.o includes/generic.h lib/generic.o lib/fileutils.o includes/fileutils.h lib/cdutils.o includes/cdutils.h lib/yazedc.o includes/yazedc.h Makefile - ${CXX} ${LDFLAGS} str-player.o lib/generic.o lib/fileutils.o lib/cdutils.o lib/yazedc.o psxdev/bs.o psxdev/idctfst.o psxdev/jfdctint.o psxdev/vlc.o psxdev/xadecode.o -o str-player +str-player: str-player.o includes/generic.h includes/fileutils.h includes/cdutils.h includes/yazedc.h lib/lib.a generic/generic.a psxdev/psxdev.a Makefile + ${CXX} ${LDFLAGS} str-player.o psxdev/psxdev.a lib/lib.a generic/generic.a -o str-player -crypto-search: crypto-search.o includes/generic.h lib/generic.o lib/fileutils.o includes/fileutils.h Makefile - ${CXX} ${LDFLAGS} crypto-search.o lib/generic.o lib/fileutils.o -o crypto-search +crypto-search: crypto-search.o includes/generic.h includes/fileutils.h lib/lib.a generic/generic.a Makefile + ${CXX} ${LDFLAGS} crypto-search.o lib/lib.a generic/generic.a -o crypto-search -bgrep: bgrep.o includes/generic.h lib/generic.o includes/fileutils.h lib/fileutils.o Makefile - ${CXX} ${LDFLAGS} bgrep.o lib/generic.o lib/fileutils.o -o bgrep +bgrep: bgrep.o includes/generic.h includes/fileutils.h generic/generic.a Makefile + ${CXX} ${LDFLAGS} bgrep.o generic/generic.a -o bgrep clean: for d in ${SUBDIRS} ; do make -C $$d clean || exit -1 ; done diff --git a/MegamanX5/Makefile b/MegamanX5/Makefile index c655df9..74bec9e 100755 --- a/MegamanX5/Makefile +++ b/MegamanX5/Makefile @@ -7,8 +7,8 @@ TARGET = unarc all: ${TARGET} -unarc: unarc.o ../includes/fileutils.h ../lib/fileutils.cpp ../includes/generic.h ../lib/generic.cpp Makefile - ${CXX} ${LDFLAGS} unarc.o ../lib/fileutils.o ../lib/generic.o -o unarc +unarc: unarc.o ../includes/fileutils.h ../includes/generic.h Makefile + ${CXX} ${LDFLAGS} unarc.o ../generic/generic.a -o unarc clean: rm -f *.o ${TARGET} compil.c diff --git a/VP/Makefile b/VP/Makefile index 9cc267d..243d11b 100755 --- a/VP/Makefile +++ b/VP/Makefile @@ -7,17 +7,17 @@ TARGET = main_dump VP-CD1.sqr decomp-slz unarc search-script all: ${TARGET} -main_dump: main_dump.o ../lib/fileutils.o ../includes/fileutils.h ../lib/cdutils.o ../includes/cdutils.h ../lib/generic.o ../includes/generic.h Makefile - ${CXX} ${LDFLAGS} main_dump.o ../lib/yazedc.o ../lib/fileutils.o ../lib/cdutils.o ../lib/generic.o -o main_dump +main_dump: main_dump.o ../includes/fileutils.h ../includes/cdutils.h ../includes/generic.h ../lib/lib.a ../generic/generic.a Makefile + ${CXX} ${LDFLAGS} main_dump.o ../lib/lib.a ../generic/generic.a -o main_dump -decomp-slz: decomp-slz.o ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h ../lib/lzss.o ../includes/lzss.h Makefile - ${CXX} ${LDFLAGS} decomp-slz.o ../lib/fileutils.o ../lib/generic.o ../lib/lzss.o -o decomp-slz +decomp-slz: decomp-slz.o ../includes/fileutils.h ../includes/generic.h ../includes/lzss.h Makefile + ${CXX} ${LDFLAGS} decomp-slz.o ../lib/lib.a ../generic/generic.a -o decomp-slz -unarc: unarc.o ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h Makefile - ${CXX} ${LDFLAGS} unarc.o ../lib/fileutils.o ../lib/generic.o -o unarc +unarc: unarc.o ../includes/fileutils.h ../includes/generic.h Makefile + ${CXX} ${LDFLAGS} unarc.o ../generic/generic.a -o unarc -search-script: search-script.o ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h Makefile - ${CXX} ${LDFLAGS} search-script.o ../lib/fileutils.o ../lib/generic.o -o search-script +search-script: search-script.o ../includes/fileutils.h ../includes/generic.h Makefile + ${CXX} ${LDFLAGS} search-script.o ../generic/generic.a -o search-script clean: rm -f *.o ${TARGET} diff --git a/Xenogears/Makefile b/Xenogears/Makefile index 339b9a2..65a1121 100755 --- a/Xenogears/Makefile +++ b/Xenogears/Makefile @@ -7,20 +7,20 @@ TARGET = reinsert main_dump Decrypt script-comp script-dec XenoCD1.sqr XenoCD2.s all: ${TARGET} -main_dump: main_dump.o ../lib/cdutils.o ../includes/cdutils.h ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h ../lib/yazedc.o ../includes/yazedc.h Makefile - ${CXX} ${LDFLAGS} main_dump.o ../lib/cdutils.o ../lib/fileutils.o ../lib/yazedc.o ../lib/generic.o -o main_dump +main_dump: main_dump.o ../includes/cdutils.h ../includes/fileutils.h ../includes/generic.h ../includes/yazedc.h ../lib/lib.a ../generic/generic.a Makefile + ${CXX} ${LDFLAGS} main_dump.o ../lib/lib.a ../generic/generic.a -o main_dump -reinsert: reinsert.o ../lib/cdutils.o ../includes/cdutils.h ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h ../lib/yazedc.o ../includes/yazedc.h Makefile - ${CXX} ${LDFLAGS} reinsert.o ../lib/cdutils.o ../lib/fileutils.o ../lib/yazedc.o ../lib/generic.o -o reinsert +reinsert: reinsert.o ../includes/cdutils.h ../includes/fileutils.h ../includes/generic.h ../includes/yazedc.h ../lib/lib.a ../generic/generic.a Makefile + ${CXX} ${LDFLAGS} reinsert.o ../lib/lib.a ../generic/generic.a -o reinsert -Decrypt: Decrypt.o ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h Makefile - ${CXX} ${LDFLAGS} Decrypt.o ../lib/fileutils.o ../lib/generic.o -o Decrypt +Decrypt: Decrypt.o ../includes/fileutils.h ../includes/generic.h ../generic/generic.a Makefile + ${CXX} ${LDFLAGS} Decrypt.o ../generic/generic.a -o Decrypt -script-comp: script-comp.o ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h ../lib/lzss.o ../includes/lzss.h Makefile - ${CXX} ${LDFLAGS} script-comp.o ../lib/fileutils.o ../lib/generic.o ../lib/lzss.o -o script-comp +script-comp: script-comp.o ../includes/fileutils.h ../includes/generic.h ../includes/lzss.h ../lib/lib.a ../generic/generic.a Makefile + ${CXX} ${LDFLAGS} script-comp.o ../lib/lib.a ../generic/generic.a -o script-comp -script-dec: script-dec.o ../lib/fileutils.o ../includes/fileutils.h ../lib/generic.o ../includes/generic.h ../lib/lzss.o ../includes/lzss.h Makefile - ${CXX} ${LDFLAGS} script-dec.o ../lib/fileutils.o ../lib/generic.o ../lib/lzss.o -o script-dec +script-dec: script-dec.o ../includes/fileutils.h ../includes/generic.h ../includes/lzss.h ../lib/lib.a ../generic/generic.a Makefile + ${CXX} ${LDFLAGS} script-dec.o ../lib/lib.a ../generic/generic.a -o script-dec clean: rm -f *.o ${TARGET} compil.c diff --git a/generic/Buffer.cpp b/generic/Buffer.cpp index edd70bc..940b0a8 100644 --- a/generic/Buffer.cpp +++ b/generic/Buffer.cpp @@ -1,6 +1,6 @@ #include <string.h> #include "Buffer.h" -#include "General.h" +#include "generic.h" #ifdef HAVE_CONFIG_H #include "config.h" #else diff --git a/generic/Exceptions.cpp b/generic/Exceptions.cpp index b541235..564362e 100644 --- a/generic/Exceptions.cpp +++ b/generic/Exceptions.cpp @@ -5,7 +5,7 @@ #include <stddef.h> #include "String.h" #include "Exceptions.h" -#include "General.h" +#include "generic.h" #ifdef HAVE_CONFIG_H #include "config.h" #else diff --git a/lib/fileutils.cpp b/generic/fileutils.cpp index b04a414..b04a414 100644 --- a/lib/fileutils.cpp +++ b/generic/fileutils.cpp diff --git a/lib/generic.cpp b/generic/generic.cpp index d165d27..d165d27 100644 --- a/lib/generic.cpp +++ b/generic/generic.cpp diff --git a/includes/generic.h b/includes/generic.h index 04c91fa..5abb92b 100644 --- a/includes/generic.h +++ b/includes/generic.h @@ -77,4 +77,12 @@ extern char verbosity; void printm(int level, char * fmt, ...); char ** split(char * s, char t); +#ifndef MAX +#define MAX(__a,__b) ((__a)<(__b)?(__b):(__a)) +#endif + +#ifndef MIN +#define MIN(__a,__b) ((__a)>(__b)?(__b):(__a)) +#endif + #endif diff --git a/lib/Makefile b/lib/Makefile index 5503701..9fbb4b3 100755 --- a/lib/Makefile +++ b/lib/Makefile @@ -3,9 +3,14 @@ CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I../includes CXX=g++ -TARGET = cdutils.o dteutils.o fileutils.o generic.o lzss.o yazedc.o +OBJECTS = cdutils.o dteutils.o lzss.o yazedc.o +TARGET = lib.a all: ${TARGET} +lib.a: ${OBJECTS} + ar -r lib.a ${OBJECTS} + ranlib lib.a + clean: rm -f *.o ${TARGET} compil.c diff --git a/psxdev/Makefile b/psxdev/Makefile index 0ddfc4f..bca0c5a 100644 --- a/psxdev/Makefile +++ b/psxdev/Makefile @@ -1,6 +1,7 @@ #!/usr/bin/make -f -TARGETS=xadecode.o bs.o idctfst.o jfdctint.o vlc.o +OBJECTS = xadecode.o bs.o idctfst.o jfdctint.o vlc.o +TARGETS = psxdev.a CC=gcc CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes @@ -9,6 +10,10 @@ CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I../includes all: ${TARGETS} +psxdev.a: ${OBJECTS} + ar -r psxdev.a ${OBJECTS} + ranlib psxdev.a + bstoppm: xadecode.o bs.o idctfst.o jfdtint.o vlc.o bstoppm.o ${CC} ${LDFLAGS} xadecode.o bs.o idcfst.o jfdtint.o vlc.o bstoppm.o -o bstoppm |