bison := @BISON@
time := @TIME@
gperf := @GPERF@
-otool := @OTOOL@
+otool := @_OTOOL@
+lipo := @_LIPO@
+nm := @_NM@
INSTALL := @INSTALL@
INSTALL_PROGRAM := @INSTALL_PROGRAM@
CY_EXECUTE := @CY_EXECUTE@
CY_OBJECTIVEC := @CY_OBJECTIVEC@
CY_OBJECTIVEC_MACH := @CY_OBJECTIVEC_MACH@
+CY_ATTACH_GROUP := @CY_ATTACH_GROUP@
svn := @SVN@
svnversion := @SVNVERSION@
ldid := true
entitle := $(ldid)
lib := lib
-dll := so
+dll := @SO@
depends :=
restart ?= $(MAKE)
ifeq ($(CY_OBJECTIVEC_MACH),1)
code += Handler.lo
-cflags += -DCY_ATTACH
+cflags += -DCY_ATTACH -DCY_LIBRARY='"$(libdir)/libcycript.$(dll)"'
inject += Mach/Inject.lo
Mach/Inject.lo: Trampoline.t.hpp Baton.hpp
%.t.hpp: %.t.cpp trampoline.sh Baton.hpp Trampoline.hpp
- # DOUG: abstract "lipo" and "nm" with configure?
- ./trampoline.sh $@ .libs/$*.t.o $* $(sed) $(otool) lipo nm $(libtool) --mode=compile $(cxx) -c -fno-stack-protector -fno-exceptions -I$(srcdir)/include -o $*.t.lo $< $(cflags)
+ $(srcdir)/trampoline.sh $@ .libs/lib$*.t.$(dll) $* $(sed) $(otool) $(lipo) $(nm) $(libtool) --mode=link $(cxx) -c -fno-stack-protector -fno-exceptions -I$(srcdir)/include -o lib$*.t.la $< $(cflags) -rpath $(libdir)
endif
endif
all: $(all)
clean::
- rm -rf *.lo *.o *.d *.t.hpp .libs */*.d */*.lo */.libs libcycript.la $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.gperf Bridge.hpp Cycript.output
+ rm -rf *.lo *.o *.d *.t.hpp .libs */*.d */*.lo */.libs lib*.la $(all) Struct.hpp lex.cy.c Cycript.tab.cc Cycript.tab.hh location.hh position.hh stack.hh cyrver Cycript.yy Cycript.l control Bridge.gperf Bridge.hpp Cycript.output
ifneq ($(srcdir),.)
rm -rf Mach ObjectiveC sig
endif
$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir)
$(libtool) --mode=install $(INSTALL_PROGRAM) libcycript.la $(DESTDIR)$(libdir)/libcycript.la
$(libtool) --mode=install $(INSTALL_PROGRAM) cycript $(DESTDIR)$(bindir)/cycript
+ifneq ($(CY_ATTACH_GROUP),)
+ chgrp $(CY_ATTACH_GROUP) $(DESTDIR)$(bindir)/cycript
+ chmod g+s $(DESTDIR)$(bindir)/cycript
+endif
uninstall:
$(libtool) --mode=uninstall rm -f $(DESTDIR)$(bindir)/cycript