summaryrefslogtreecommitdiff
path: root/Makefile
blob: c46bd9c10979dafd0ef9660bc76e62d87c5c44ad (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
43
44
45
46
47
48
#!/usr/bin/make -f

CPPFLAGS=-Wall -g -O3 -mcpu=i686 -Werror -Iincludes `sdl-config --cflags` -DHAVE_ZLIB
LDFLAGS=-lz `sdl-config --libs` -lGL -lGLU -L/usr/X11/lib -lefence
CXX=g++

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

all: subdirs ${TARGET}

subdirs:
	for d in ${SUBDIRS} ; do make -C $$d || exit -1 ; done

lzss: includes/lzss.h includes/generic.h lzss-main.o generic/generic.a lib/lib.a Makefile
	${CXX} -DLZSS_MAIN lzss-main.o lib/lib.a generic/generic.a -o lzss ${LDFLAGS}

dlzss: lzss Makefile
	ln -fs lzss dlzss

yazedc: yazedc-main.o lib/lib.a Makefile
	${CXX} yazedc-main.o lib/lib.a -DYAZEDC_MAIN -o yazedc ${LDFLAGS}

cd-tool: includes/cdutils.h includes/generic.h includes/yazedc.h cd-tool.o lib/lib.a generic/generic.a Makefile
	${CXX} cd-tool.o lib/lib.a generic/generic.a -o cd-tool ${LDFLAGS}

dte-tool: includes/generic.h includes/dte.h dtemain.o lib/lib.a generic/generic.a Makefile
	${CXX} dtemain.o lib/lib.a generic/generic.a -o dte-tool ${LDFLAGS}

str-player: str-player.o includes/generic.h includes/cdutils.h includes/yazedc.h lib/lib.a generic/generic.a psxdev/psxdev.a Makefile
	${CXX} str-player.o psxdev/psxdev.a lib/lib.a generic/generic.a -o str-player ${LDFLAGS}

crypto-search: crypto-search.o includes/generic.h lib/lib.a generic/generic.a Makefile
	${CXX} crypto-search.o lib/lib.a generic/generic.a -o crypto-search ${LDFLAGS}

bgrep: bgrep.o includes/generic.h generic/generic.a Makefile
	${CXX} bgrep.o generic/generic.a -o bgrep ${LDFLAGS}

tile-convert: tile-convert.o generic/generic.a Makefile
	${CXX} tile-convert.o generic/generic.a -o ffx-convert ${LDFLAGS}

gltest: gltest.o mogltk/mogltk.a generic/generic.a Makefile
	${CXX} gltest.o mogltk/mogltk.a generic/generic.a -o gltest ${LDFLAGS}

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