Makefile.darwin-lib revision 02ef19621032044c1488931b3f970e11dca0afe0
1# 2# This is a Makefile stub which handles the creation of Darwin BSD shared 3# libraries. 4# 5# In order to use this stub, the following makefile variables must be defined. 6# 7# BSDLIB_VERSION = 1.0 8# BSDLIB_IMAGE = libce 9# BSDLIB_MYDIR = et 10# BSDLIB_INSTALL_DIR = $(SHLIBDIR) 11# 12 13all:: pic image 14 15subdirs:: Makefile 16 @echo " MKDIR pic" 17 @mkdir -p pic 18 19BSD_LIB = $(BSDLIB_IMAGE).$(BSDLIB_VERSION).dylib 20BSDLIB_PIC_FLAG = -fPIC 21 22image: $(BSD_LIB) 23 24$(BSD_LIB): $(OBJS) 25 @echo " GEN_BSD_SOLIB $(BSD_LIB)" 26 @(cd pic; $(CC) -dynamiclib -compatibility_version 1.0 -current_version $(BSDLIB_VERSION) \ 27 -flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS)) 28 @$(MV) pic/$(BSD_LIB) . 29 @$(RM) -f ../$(BSD_LIB) 30 @$(LN) $(BSD_LIB) ../$(BSD_LIB) 31 @$(LN) ../$(BSD_LIB) ../$(BSDLIB_IMAGE).dylib 32 33install-shlibs install:: $(BSD_LIB) 34 @echo " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)" 35 @$(INSTALL_PROGRAM) $(BSD_LIB) \ 36 $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB) 37 @-$(LDCONFIG) 38 39install-strip: install 40 41install-shlibs-strip: install-shlibs 42 43uninstall-shlibs uninstall:: 44 $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB) 45 46clean:: 47 $(RM) -rf pic 48 $(RM) -f $(BSD_LIB) 49 $(RM) -f ../$(BSD_LIB) 50 $(RM) -f ../$(BSDLIB_IMAGE).dylib 51