123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- # optimize mac binaries and/or build universal binaries
- CFLAGS += -Wno-gnu-variable-sized-type-not-at-end -Wno-address-of-packed-member
- #-----------------------------------------------------------------------------
- .PHONY : mac-distrib
- mac-distrib: mac1 doc $(INSTALL_SCRIPTS) gen-mac-distrib
- .PHONY : mac1
- mac1: mac-x86_64
- @echo
- @echo "----- building universal binaries -----"
- @for i in $(MAIN_TOOLS); do \
- lipo -create bin/x86_64/$${i} -output $${i}; \
- cp -p $${i} bin/$${i}; \
- done;
- @for i in $(WDF_LINKS); do \
- cp -p wdf $${i}; \
- cp -p wdf bin/$${i}; \
- done;
- @rm -rf bin/i386 bin/x86_64
- @echo "done"
- .PHONY : mac2
- mac2: mac-i386 mac-x86_64
- @echo
- @echo "----- building universal binaries -----"
- @for i in $(MAIN_TOOLS); do \
- lipo -create bin/i386/$${i} bin/x86_64/$${i} -output $${i}; \
- cp -p $${i} bin/$${i}; \
- done;
- @for i in $(WDF_LINKS); do \
- cp -p wdf $${i}; \
- cp -p wdf bin/$${i}; \
- done;
- @rm -rf bin/i386 bin/x86_64
- @echo "done"
- .PHONY : mac3
- mac3: mac-i386 mac-x86_64 mac-ppc
- @echo
- @echo "----- building universal binaries -----"
- @for i in $(MAIN_TOOLS); do \
- lipo -create bin/ppc/$${i} bin/i386/$${i} bin/x86_64/$${i} -output $${i}; \
- cp -p $${i} bin/$${i}; \
- done;
- @for i in $(WDF_LINKS); do \
- cp -p wdf $${i}; \
- cp -p wdf bin/$${i}; \
- done;
- @rm -rf bin/ppc bin/i386 bin/x86_64
- @echo "done"
- #-----------------------------------------------------------------------------
- .PHONY : mac-ppc
- mac-ppc:
- @echo
- @echo "----- building PowerPC -----"
- @XFLAGS="-arch ppc -mcpu=powerpc" make clean all
- @mkdir -p bin/ppc
- @mv $(MAIN_TOOLS) bin/ppc
- #-----------------------------------------------------------------------------
- .PHONY : mac-i386
- mac-i386:
- @echo
- @echo "----- building i386 -----"
- @XFLAGS="-arch i386 -mfpmath=sse -march=prescott" make clean all
- @mkdir -p bin/i386
- @mv $(MAIN_TOOLS) bin/i386
- #-----------------------------------------------------------------------------
- .PHONY : mac-x86_64
- mac-x86_64:
- @echo
- @echo "----- building X86-64 -----"
- @XFLAGS="-arch x86_64 -mfpmath=sse" make clean all
- @mkdir -p bin/x86_64
- @mv $(MAIN_TOOLS) bin/x86_64
- #-----------------------------------------------------------------------------
- .PHONY : gen-mac-distrib
- gen-mac-distrib:
- @printf "$(LOGFORMAT)" create "$(DISTRIB_PATH)" ""
- @rm -rf $(DISTRIB_PATH)
- @mkdir -p $(DISTRIB_PATH)/bin $(DISTRIB_PATH)/scripts
- @mkdir -p $(DISTRIB_PATH)/share $(DISTRIB_PATH)/doc
- @cp -p $(DISTRIB_FILES) $(DISTRIB_PATH)
- @cp -p $(MAIN_TOOLS) $(WDF_LINKS) $(DISTRIB_PATH)/bin
- @cp -p share/*.txt $(DISTRIB_PATH)/share
- @cp -p $(DOC_FILES) $(DISTRIB_PATH)/doc
- @cp -p $(SCRIPTS)/*.{sh,txt} $(DISTRIB_PATH)/scripts
- @chmod -R 755 $(DISTRIB_PATH)
- @chmod a+x $(DISTRIB_PATH)/*.sh $(DISTRIB_PATH)/scripts/*.sh $(DISTRIB_PATH)/bin/*
- @chmod -R a+X $(DISTRIB_PATH)
- -$(DISTRIB_PATH)/bin/wit version -l
- -$(DISTRIB_PATH)/bin/wit version -ll
- @tar -czf $(DISTRIB_PATH).tar.gz $(DISTRIB_PATH)
- @ln $(DISTRIB_PATH).tar.gz latest-mac.tar.gz
|