If you're hacky enough, you can now call into auto-generated interfaces from
[wvapps.git] / xplcidl / Makefile
blob4173819a94562aa80ee6efc4f5f7f454d424eb9c
1 WVSTREAMS=$(PWD)/../niti/src/wvstreams
2 include wvrules.mk
4 XPATH=. auto
5 CFLAGS+=-DUNSTABLE
6 CFLAGS+=$(shell pkg-config --cflags libIDL) -I/usr/include/libIDL-2.0
7 xplcidl-LIBS+=-lIDL-2 $(LIBUNICONF)
9 default: cpptest ctest multitest scriptest
11 all: xplcidl stuff.a auto/dispatch_IMulti.o
13 stuff.a: mymulti.o cppimpl.o expected.o masterdispatch.o uniscript.o
15 test: cpptest ctest ctest_tcl.so multitest scriptest uniscript_tcl.so
16 ./cpptest
17 ./ctest
18 ./test.tcl
19 ./multitest
20 ./scriptest
21 ./uniscript.tcl
23 ctest_tcl.so: auto/ctest_tcl.o stuff.a
25 -lxplc -lxplc-cxx:
26 @true
28 uniscript_tcl.so: auto/uniscript_tcl.o mymulti.o auto/dispatch_IMulti.o \
29 stuff.a $(LIBUNICONF)
31 auto/ctest_tcl.c: ctest.h auto/test.h
33 auto/%_tcl.c: %.h
34 rm -f $@ $@.new
35 swig -tcl -module $*_tcl -Wall -includeall -Iauto -o $@.new $<
36 mv $@.new $@
38 auto/ctest_tcl.o: auto/ctest_tcl.c ctest.h auto/test.h
39 $(CC) $(CFLAGS) -include ctest.h -c $< -o $@
41 auto/dispatch_%.cc: %.idl xplcidl
42 rm -f $@
43 ./xplcidl dispatch $< >$@.new
44 mv $@.new $@
46 auto/%.hpp: %.idl xplcidl
47 rm -f $@
48 ./xplcidl c++ $< >$@.new
49 mv $@.new $@
51 auto/%.h: %.idl xplcidl
52 rm -f $@
53 ./xplcidl c $^ >$@.new
54 mv $@.new $@
56 cppimpl.o cpptest.o: auto/test.hpp auto/IObject.hpp
58 cimpl.o ctest.o: auto/test.h
60 cpptest: cpptest.o stuff.a
62 ctest: ctest.o stuff.a
64 multitest-LIBS=$(LIBUNICONF)
65 ptrtest-LIBS=$(LIBWVBASE)
66 scriptest-LIBS=$(LIBUNICONF)
68 scriptest multitest: stuff.a
70 # scriptest: intwrap.o
71 scriptest: auto/dispatch_IMulti.o mymulti.o
74 mymulti.o: auto/IMulti.hpp
76 clean:
77 rm -f xplcidl *test *.new auto/.*.d \
78 $(shell find auto -type f -name '*' -maxdepth 1)