3 CFLAGS = -Igensrc -ggdb
4 CXXFLAGS = -Igensrc -ggdb
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
10 all: glwrap.so gldump gldbg
12 glwrap.so: source/glwrap.o
13 $(CC) -shared -o $@ $^ $(LIBS) $(LDFLAGS)
15 gldump: source/gldecoder.o source/gldump.o source/glprint.o
16 $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
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)
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
26 source/gldbg.o: source/gldbg.cpp source/gldbg.h source/gldecoder.h source/tracer.h
27 $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
29 source/tracer.o: source/tracer.cpp source/gldecoder.h source/glprint.h
30 $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
32 source/commandinterpreter.o: source/commandinterpreter.cpp source/gldbg.h
33 $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
35 source/process.o: source/process.cpp source/process.h
36 $(CXX) -c $(CXXFLAGS) $(CXXFLAGS_gldbg) -o $@ $<
38 gensrc/%: source/%.t gensrc/.created genwrap.py
39 python ./genwrap.py $< >$@
41 #gensrc/functions.enum gensrc/gldecoder.funcs gensrc/gldecoder.struct gensrc/glwrap.funcs gensrc/glprint.funcs: gensrc/.created genwrap.py gl.spec gl.tm