summaryrefslogtreecommitdiff
path: root/Makefile
blob: b68b79b8a6a9189448483401d1ae175e05ae44c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/make -f

CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -Iincludes `sdl-config --cflags`
LDFLAGS=`sdl-config --libs`
CXX=g++

SUBDIRS = psxdev generic lib Xenogears VP MegamanX5
TARGET = lzss dlzss cd-tool str-player crypto-search bgrep dte-tool

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

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

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

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

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

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

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

clean:
	for d in ${SUBDIRS} ; do make -C $$d clean || exit -1 ; done
	rm -f *.o ${TARGET} compil.c