]> git.tdb.fi Git - gldbg.git/blob - Makefile
33a2f4e824f0f0a09f0d9ef9a719a40a666e2477
[gldbg.git] / Makefile
1 # $Id$
2
3 CFLAGS = -Igensrc -ggdb
4 CXXFLAGS = -Igensrc -ggdb
5
6 PACKAGES_gldbg = mspcore mspstrings mspio mspfs
7 CXXFLAGS_gldbg = $(shell pkg-config --cflags $(PACKAGES_gldbg))
8 LIBS_gldbg = $(shell pkg-config --libs $(PACKAGES_gldbg)) -lreadline
9
10 all: glwrap.so gldump gldbg
11
12 glwrap.so: source/glwrap.o
13         $(CC) -shared -o $@ $^ $(LIBS) $(LDFLAGS)
14
15 gldump: source/gldecoder.o source/gldump.o source/glprint.o
16         $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
17
18 gldbg: source/gldbg.o source/gldecoder.o source/glprint.o source/commandinterpreter.o source/tracer.o source/process.o
19         $(CXX) -o $@ $^ $(LIBS_gldbg) $(LIBS) $(LDFLAGS)
20
21 source/glwrap.o: source/functions.h gensrc/functions.enum gensrc/glwrap.funcs
22 source/gldecoder.o: source/functions.h gensrc/gldecoder.struct gensrc/gldecoder.funcs gensrc/gldecoder.funcs
23 source/gldump.o: source/gldecoder.h gensrc/gldecoder.struct source/glprint.h
24 source/glprint.o: gensrc/glprint.funcs gensrc/gldecoder.struct
25
26 source/gldbg.o: source/gldbg.cpp source/gldbg.h source/gldecoder.h source/tracer.h
27         $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
28
29 source/tracer.o: source/tracer.cpp source/gldecoder.h source/glprint.h
30         $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
31
32 source/commandinterpreter.o: source/commandinterpreter.cpp source/gldbg.h
33         $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
34
35 source/process.o: source/process.cpp source/process.h
36         $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
37
38 gensrc/%: source/%.t gensrc/.created genwrap.py
39         python ./genwrap.py $< >$@
40
41 #gensrc/functions.enum gensrc/gldecoder.funcs gensrc/gldecoder.struct gensrc/glwrap.funcs gensrc/glprint.funcs: gensrc/.created genwrap.py gl.spec gl.tm
42 #       python ./genwrap.py
43
44 gensrc/.created:
45         mkdir -p gensrc
46         touch $@