#
-# "$Id: Makefile 6945 2007-09-12 17:08:32Z mike $"
+# "$Id: Makefile 7613 2008-05-22 23:27:52Z mike $"
#
# Top-level Makefile for the Common UNIX Printing System (CUPS).
#
-# Copyright 2007 by Apple Inc.
+# Copyright 2007-2008 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
# Directories to make...
#
-DIRS = cups backend berkeley cgi-bin filter locale man monitor \
- notifier $(PDFTOPS) scheduler systemv test \
+DIRS = cups filter backend berkeley cgi-bin driver locale man monitor \
+ notifier ppdc scheduler systemv test \
$(PHPDIR) \
- conf data doc $(FONTS) ppd templates
+ conf data doc $(FONTS) templates
#
all:
chmod +x cups-config
+ echo Using ARCHFLAGS="$(ARCHFLAGS)"
+ echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
+ echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+ echo Using CC="$(CC)"
+ echo Using CXX="$(CC)"
+ echo Using DSOFLAGS="$(DSOFLAGS)"
+ echo Using LDFLAGS="$(LDFLAGS)"
+ echo Using LIBS="$(LIBS)"
for dir in $(DIRS); do\
echo Making all in $$dir... ;\
- (cd $$dir ; $(MAKE) $(MFLAGS)) || exit 1;\
+ (cd $$dir ; $(MAKE) $(MFLAGS) all) || exit 1;\
+ done
+
+
+#
+# Make library targets...
+#
+
+libs:
+ echo Using ARCHFLAGS="$(ARCHFLAGS)"
+ echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
+ echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+ echo Using CC="$(CC)"
+ echo Using CXX="$(CC)"
+ echo Using DSOFLAGS="$(DSOFLAGS)"
+ echo Using LDFLAGS="$(LDFLAGS)"
+ echo Using LIBS="$(LIBS)"
+ for dir in $(DIRS); do\
+ echo Making libraries in $$dir... ;\
+ (cd $$dir ; $(MAKE) $(MFLAGS) libs) || exit 1;\
+ done
+
+
+#
+# Make unit test targets...
+#
+
+unittests:
+ echo Using ARCHFLAGS="$(ARCHFLAGS)"
+ echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
+ echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+ echo Using CC="$(CC)"
+ echo Using CXX="$(CC)"
+ echo Using DSOFLAGS="$(DSOFLAGS)"
+ echo Using LDFLAGS="$(LDFLAGS)"
+ echo Using LIBS="$(LIBS)"
+ for dir in $(DIRS); do\
+ echo Making all in $$dir... ;\
+ (cd $$dir ; $(MAKE) $(MFLAGS) unittests) || exit 1;\
done
distclean: clean
$(RM) Makedefs config.h config.log config.status
- $(RM) cups-config conf/cupsd.conf conf/pam.std
- $(RM) doc/help/ref-cupsd-conf.html doc/help/standard.html
- $(RM) doc/index.html
- $(RM) init/cups.sh init/cups-lpd
+ $(RM) cups-config
+ $(RM) conf/cupsd.conf conf/mime.convs conf/pam.std conf/snmp.conf
+ $(RM) doc/help/ref-cupsd-conf.html doc/help/standard.html doc/index.html
+ $(RM) init/cups.sh init/cups-lpd init/org.cups.cups-lpd.plist
$(RM) man/client.conf.man
$(RM) man/cups-deviced.man man/cups-driverd.man
$(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
done
+#
+# Run the clang.llvm.org static code analysis tool on the C sources.
+#
+
+.PHONY: clang
+clang:
+ if test ! -d clang; then \
+ mkdir clang; \
+ else \
+ rm -rf clang/*; \
+ fi
+ $(MAKE) $(MFLAGS) CC="scan-build -o ../clang $(CC)" \
+ CXX="scan-build -o ../clang $(CXX)" clean all
+ test `ls -1 clang | wc -l` = 0
+
+
#
# Generate a ctags file...
#
#
-# Install object and target files...
+# Install everything...
#
-install: installhdrs
+install: install-data install-headers install-libs install-exec
+
+
+#
+# Install data files...
+#
+
+install-data:
for dir in $(DIRS); do\
- echo Installing in $$dir... ;\
- (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\
+ echo Installing data files in $$dir... ;\
+ (cd $$dir; $(MAKE) $(MFLAGS) install-data) || exit 1;\
done
echo Installing cups-config script...
$(INSTALL_DIR) -m 755 $(BINDIR)
fi
if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
$(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
- if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
- echo Installing StartupItems files...; \
- $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
- $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
- $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
- $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
- elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
+ if test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
echo Installing LaunchDaemons configuration files...; \
$(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
$(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
fi \
fi
+ if test "x$(SMFMANIFESTDIR)" != x; then \
+ echo Installing SMF manifest in $(SMFMANIFESTDIR)...;\
+ $(INSTALL_DIR) $(BUILDROOT)/$(SMFMANIFESTDIR); \
+ $(INSTALL_SCRIPT) init/cups.xml $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
+ fi
if test "x$(DBUSDIR)" != x; then \
echo Installing cups.conf in $(DBUSDIR)...;\
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR)/system.d; \
$(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
fi
+#
+# Install header files...
+#
+
+install-headers:
+ for dir in $(DIRS); do\
+ echo Installing header files in $$dir... ;\
+ (cd $$dir; $(MAKE) $(MFLAGS) install-headers) || exit 1;\
+ done
+
#
-# Install source and header files...
+# Install programs...
#
-installsrc:
- gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf -
+install-exec: all
+ for dir in $(DIRS); do\
+ echo Installing programs in $$dir... ;\
+ (cd $$dir; $(MAKE) $(MFLAGS) install-exec) || exit 1;\
+ done
+
-installhdrs:
- (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\
- (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;
+#
+# Install libraries...
+#
+
+install-libs: libs
+ for dir in $(DIRS); do\
+ echo Installing libraries in $$dir... ;\
+ (cd $$dir; $(MAKE) $(MFLAGS) install-libs) || exit 1;\
+ done
#
#
-# End of "$Id: Makefile 6945 2007-09-12 17:08:32Z mike $".
+# End of "$Id: Makefile 7613 2008-05-22 23:27:52Z mike $".
#