0
|
1 TOP =..
|
|
2 include $(TOP)/config
|
|
3 INSTALL_PREFIX ?=../../../src
|
|
4 INSTALL_LUA =$(INSTALL_PREFIX)
|
|
5 INSTALL_LIB =$(INSTALL_PREFIX)
|
|
6 CPPFLAGS =-I$(LUA)/include -I$(DYNCALL)/include -I$(BOOST_INCDIR)
|
|
7 CXXFLAGS =-fno-exceptions -fno-rtti
|
|
8 DYNTYPE =dyntype_boost.o
|
|
9 # LDFLAGS =-L$(LUA)/lib -llua -L$(DYNCALL)/lib -ldynload_s -ldyncall_s -ldyncallback_s $(DYNTYPE)
|
|
10 # MAC OS X:
|
|
11 LDFLAGS =-bundle -undefined dynamic_lookup
|
|
12 LD =gcc
|
|
13 all: intutils.so smartptr.so ldynload.so ldyncall.so cocoautil.dylib
|
|
14 # ldynguess.so
|
|
15 # $(DYNTYPE) smartptr.so ldynguess.so ldyntype.so ldynload.so ldyncall.so ldynstruct.so # TODO: ldyncallback.so
|
|
16 # lsmartptr.so $(DYNTYPE) ldynguess.so ldyntype.so ldynload.so ldyncall.so ldynstruct.so # TODO: ldyncallback.so
|
|
17
|
|
18 %.so: %.o
|
|
19 $(LD) $(LDFLAGS) -o $@ $^
|
|
20
|
|
21 ldynload.so: ldynload.o
|
|
22 $(LD) $(LDFLAGS) -o $@ $^ -L$(DYNCALL)/lib -ldynload_s
|
|
23
|
|
24 ldyncall.so: ldyncall.o
|
|
25 $(LD) $(LDFLAGS) -o $@ $^ -L$(DYNCALL)/lib -ldyncall_s
|
|
26
|
|
27 cocoa.dylib: cocoa.o
|
|
28 gcc -dynamiclib -o $@ $^ -framework AppKit
|
|
29
|
|
30 clean:
|
|
31 rm -f *.so *.o
|
|
32
|
|
33 install:
|
|
34 cp intutils.so smartptr.so ldynload.so ldyncall.so $(INSTALL_LIB)
|
|
35 cp dynload.lua dyncall.lua dynport.lua $(INSTALL_LUA)
|
|
36
|