1## 2# Makefile for cups 3## 4 5# Project info 6Project = cups 7UserType = Administrator 8ToolType = Services 9 10GnuNoChown = YES 11GnuAfterInstall = install-plist 12 13# It's a GNU Source project 14include $(MAKEFILEPATH)/CoreOS/ReleaseControl/GNUSource.make 15 16# Specify the configure flags to use... 17Configure_Flags = --with-cups-build="cups-408" \ 18 --with-archflags="$(RC_CFLAGS)" \ 19 --with-ldarchflags="`$(SRCROOT)/getldarchflags.sh $(RC_CFLAGS)` $(PPC_FLAGS)" \ 20 --with-adminkey="system.print.admin" \ 21 --with-operkey="system.print.operator" \ 22 --with-pam-module=opendirectory \ 23 --with-privateinclude=/usr/local/include \ 24 $(Extra_Configure_Flags) 25 26# Add "--enable-debug-guards" during OS development, remove for production... 27# --enable-debug-guards \ 28 29# CUPS is able to build 1/2/3/4-way fat on its own, so don't override the 30# compiler flags in make, just in configure... 31Environment = CC=`$(SRCROOT)/getcompiler.sh cc` \ 32 CXX=`$(SRCROOT)/getcompiler.sh cxx` 33 34# The default target installs programs and data files... 35Install_Target = install-data install-exec 36Install_Flags = -j`sysctl -n hw.activecpu` 37 38# The alternate target installs libraries and header files... 39#Install_Target = install-headers install-libs 40#Install_Flags = 41 42# Shadow the source tree and force a re-configure as needed 43lazy_install_source:: $(BuildDirectory)/Makedefs 44 $(_v) if [ -L "$(BuildDirectory)/Makefile" ]; then \ 45 $(RM) "$(BuildDirectory)/Makefile"; \ 46 $(CP) "$(Sources)/Makefile" "$(BuildDirectory)/Makefile"; \ 47 fi 48 49# Re-configure when the configure script and config.h, cups-config, or Makedefs 50# templates change. 51$(BuildDirectory)/Makedefs: $(Sources)/configure $(Sources)/Makedefs.in \ 52 $(Sources)/config.h.in $(Sources)/cups-config.in \ 53 $(SRCROOT)/Makefile 54 $(_v) $(RM) "$(BuildDirectory)/Makefile" 55 $(_v) $(MAKE) shadow_source 56 $(_v) $(RM) $(ConfigStamp) 57 58# Install fast, without copying sources... 59install-fast: $(Sources)/Makedefs 60 $(_v) umask $(Install_Mask) ; $(MAKE) -C $(Sources) $(Environment) $(Install_Flags) install 61 62install-clean: $(Sources)/Makedefs 63 $(_v) umask $(Install_Mask) ; $(MAKE) -C $(Sources) $(Environment) $(Install_Flags) distclean 64 $(_v) cd $(Sources) && $(Environment) LD_TRACE_FILE=/dev/null $(Configure) $(Configure_Flags) 65 $(_v) umask $(Install_Mask) ; $(MAKE) -C $(Sources) $(Environment) $(Install_Flags) install 66 67$(Sources)/Makedefs: $(Sources)/configure $(Sources)/Makedefs.in \ 68 $(Sources)/config.h.in $(Sources)/cups-config.in 69 @echo "Configuring $(Project)..." 70 $(_v) cd $(Sources) && $(Environment) LD_TRACE_FILE=/dev/null \ 71 $(Configure) $(Configure_Flags) 72 73# Install everything. 74install-all: configure 75 $(_v) umask $(Install_Mask) ; $(MAKE) -C $(BuildDirectory) $(Environment) $(Install_Flags) install 76 77 78# Install the libraries and headers. 79install-libs: configure 80 $(_v) umask $(Install_Mask) ; $(MAKE) -C $(BuildDirectory) $(Environment) $(Install_Flags) install-headers install-libs 81 82 83# The plist keeps track of the open source version we ship... 84OSV = $(DSTROOT)/usr/local/OpenSourceVersions 85OSL = $(DSTROOT)/usr/local/OpenSourceLicenses 86 87install-plist: 88 $(MKDIR) $(OSV) 89 $(INSTALL_FILE) $(SRCROOT)/$(Project).plist $(OSV)/$(Project).plist 90 $(MKDIR) $(OSL) 91 $(INSTALL_FILE) $(Sources)/LICENSE.txt $(OSL)/$(Project).txt 92