]> git.tdb.fi Git - gldbg.git/blob - Makefile
Add gldbg program
[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))
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
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/glprint.h
27         $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
28
29 gensrc/functions.enum gensrc/gldecoder.funcs gensrc/gldecoder.struct gensrc/glwrap.funcs gensrc/glprint.funcs: gensrc/.created genwrap.py gl.spec gl.tm
30         python ./genwrap.py
31
32 gensrc/.created:
33         mkdir -p gensrc
34         touch $@