view lua/luadyncall/src/Makefile.custom @ 29:6cc2b7fc7ea2

bigger pydc update: - cleanups and refactoring - python 2 fixes in var conversions (especially w/ respect to int vs long) - fix to pydc.free() which didn't work at all - fix to return python bool as actual bool - test lib covering all conversions (manual verification, though :-/)
author Tassilo Philipp
date Wed, 08 Apr 2020 22:17:43 +0200
parents 0cfcc391201f
children
line wrap: on
line source

TOP		 =..
include $(TOP)/config
INSTALL_PREFIX	?=../../../src
INSTALL_LUA	 =$(INSTALL_PREFIX)
INSTALL_LIB	 =$(INSTALL_PREFIX)
CPPFLAGS	 =-I$(LUA)/include -I$(DYNCALL)/include -I$(BOOST_INCDIR)
CXXFLAGS	 =-fno-exceptions -fno-rtti
DYNTYPE		 =dyntype_boost.o
# LDFLAGS		 =-L$(LUA)/lib -llua -L$(DYNCALL)/lib -ldynload_s -ldyncall_s -ldyncallback_s $(DYNTYPE)
# MAC OS X:
LDFLAGS		 =-bundle -undefined dynamic_lookup
LD		 =gcc
all: intutils.so smartptr.so ldynload.so ldyncall.so cocoautil.dylib
# ldynguess.so
# $(DYNTYPE) smartptr.so ldynguess.so ldyntype.so ldynload.so ldyncall.so ldynstruct.so # TODO: ldyncallback.so
# lsmartptr.so $(DYNTYPE) ldynguess.so ldyntype.so ldynload.so ldyncall.so ldynstruct.so # TODO: ldyncallback.so

%.so: %.o
	$(LD) $(LDFLAGS) -o $@ $^  

ldynload.so: ldynload.o
	$(LD) $(LDFLAGS) -o $@ $^ -L$(DYNCALL)/lib -ldynload_s

ldyncall.so: ldyncall.o
	$(LD) $(LDFLAGS) -o $@ $^ -L$(DYNCALL)/lib -ldyncall_s

cocoa.dylib: cocoa.o
	gcc -dynamiclib -o $@ $^ -framework AppKit

clean:
	rm -f *.so *.o

install:
	cp intutils.so smartptr.so ldynload.so ldyncall.so $(INSTALL_LIB)
	cp dynload.lua dyncall.lua dynport.lua $(INSTALL_LUA)