]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/Makefile
Drop API help for CGI, MIME, and PPD compiler libraries.
[thirdparty/cups.git] / scheduler / Makefile
index c8570be6277eaa05db9e3fd4d04bff2e27d56226..715d88fddaa3830ce68f665fdd0b3737150befcb 100644 (file)
@@ -1,16 +1,14 @@
 #
-# "$Id: Makefile 7875 2008-08-27 22:53:31Z mike $"
+# Scheduler Makefile for CUPS.
 #
-#   Scheduler Makefile for CUPS.
+# Copyright 2007-2016 by Apple Inc.
+# Copyright 1997-2007 by Easy Software Products, all rights reserved.
 #
-#   Copyright 2007-2011 by Apple Inc.
-#   Copyright 1997-2007 by Easy Software Products, all rights reserved.
-#
-#   These coded instructions, statements, and computer programs are the
-#   property of Apple Inc. and are protected by Federal copyright
-#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-#   which should have been included with this file.  If this file is
-#   file is missing or damaged, see the license at "http://www.cups.org/".
+# These coded instructions, statements, and computer programs are the
+# property of Apple Inc. and are protected by Federal copyright
+# law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+# which should have been included with this file.  If this file is
+# file is missing or damaged, see the license at "http://www.cups.org/".
 #
 
 include ../Makedefs
@@ -21,6 +19,7 @@ CUPSDOBJS =   \
                cert.o \
                classes.o \
                client.o \
+               colorman.o \
                conf.o \
                dirsvc.o \
                env.o \
@@ -112,7 +111,7 @@ unittests:  $(UNITTARGETS)
 clean:
        $(RM) $(OBJS)
        $(RM) $(TARGETS) $(UNITTARGETS) convert
-       $(RM) libcupsmime.so libcupsmime.sl libcupsmime.dylib
+       $(RM) libcupsmime.so libcupsmime.dylib
 
 
 #
@@ -120,8 +119,16 @@ clean:
 #
 
 depend:
-       makedepend -Y -I.. -fDependencies $(COBJS:.o=.c) \
-               $(CXXOBJS:.o=.cxx) >/dev/null 2>&1
+       $(CC) -MM $(ALL_CFLAGS) $(COBJS:.o=.c) >Dependencies
+       $(CXX) -MM $(ALL_CXXFLAGS) $(CXXOBJS:.o=.cxx) >>Dependencies
+
+
+#
+# Run oclint to check code coverage...
+#
+
+oclint:
+       oclint -o=oclint.html -html $(CUPSDOBJS:.o=.c) $(LIBOBJS:.o=.c) -- $(ALL_CFLAGS)
 
 
 #
@@ -140,8 +147,6 @@ install-data:
        $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver
        echo Creating $(SERVERROOT)...
        $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)
-       echo Creating $(SERVERROOT)/interfaces...
-       $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/interfaces
        echo Creating $(SERVERROOT)/ppd...
        $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/ppd
        if test "x`uname`" != xDarwin; then \
@@ -162,7 +167,7 @@ install-data:
        echo Creating $(REQUESTS)/tmp...
        $(INSTALL_DIR) -m 1770 -g $(CUPS_GROUP) $(REQUESTS)/tmp
        echo Creating $(CACHEDIR)...
-       $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)
+       $(INSTALL_DIR) -m 770 -g $(CUPS_GROUP) $(CACHEDIR)
        if test "x$(INITDIR)" != x; then \
                echo Installing init scripts...; \
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
@@ -170,32 +175,36 @@ install-data:
                for level in $(RCLEVELS); do \
                        $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
                        $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/S$(RCSTART)cups; \
-                       if test `uname` = HP-UX; then \
-                               level=`expr $$level - 1`; \
-                               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
-                       fi; \
                        $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/K$(RCSTOP)cups; \
                done; \
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
                $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc0.d/K$(RCSTOP)cups; \
        fi
-       if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
-               $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
-               if test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
-                       echo Installing LaunchDaemons configuration files...; \
-                       $(INSTALL_DATA) org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
-                       $(INSTALL_DATA) org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
-               else \
-                       echo Installing RC script...; \
-                       $(INSTALL_SCRIPT) cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
-               fi \
+       if test "x$(INITDDIR)" != x; then \
+               echo Installing init script...; \
+               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR); \
+               $(INSTALL_SCRIPT) cups.sh $(BUILDROOT)$(INITDDIR); \
+       fi
+       if test "x$(LAUNCHD_DIR)" != x; then \
+               echo Installing launchd configuration files...; \
+               $(INSTALL_DIR) $(BUILDROOT)$(LAUNCHD_DIR); \
+               $(INSTALL_DATA) org.cups.cupsd.plist $(BUILDROOT)$(LAUNCHD_DIR); \
+               $(INSTALL_DATA) org.cups.cups-lpd.plist $(BUILDROOT)$(LAUNCHD_DIR); \
        fi
        if test "x$(SMFMANIFESTDIR)" != x; then \
                echo Installing SMF manifest in $(SMFMANIFESTDIR)...;\
                $(INSTALL_DIR) $(BUILDROOT)/$(SMFMANIFESTDIR); \
                $(INSTALL_SCRIPT) cups.xml $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
        fi
-       if test "x$(XINETD)" != x; then \
+       if test "x$(SYSTEMD_DIR)" != x; then \
+               echo Installing systemd configuration files...; \
+               $(INSTALL_DIR) $(BUILDROOT)$(SYSTEMD_DIR); \
+               $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR); \
+               $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR); \
+               $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR); \
+               $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cups-lpd@.service; \
+               $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR); \
+       elif test "x$(XINETD)" != x; then \
                echo Installing xinetd configuration file for cups-lpd...; \
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
                $(INSTALL_DATA) cups-lpd.xinetd $(BUILDROOT)$(XINETD)/cups-lpd; \
@@ -209,7 +218,7 @@ install-data:
 install-exec:
        echo Installing programs in $(SBINDIR)...
        $(INSTALL_DIR) -m 755 $(SBINDIR)
-       $(INSTALL_BIN) -m 500 cupsd $(SBINDIR)
+       $(INSTALL_BIN) -m $(CUPS_CUPSD_FILE_PERM) cupsd $(SBINDIR)
        $(INSTALL_BIN) cupsfilter $(SBINDIR)
        echo Installing programs in $(SERVERBIN)/daemon...
        $(INSTALL_DIR) -m 755 $(SERVERBIN)
@@ -218,11 +227,11 @@ install-exec:
        $(INSTALL_BIN) cups-driverd $(SERVERBIN)/daemon
        $(INSTALL_BIN) cups-exec $(SERVERBIN)/daemon
        $(INSTALL_BIN) cups-lpd $(SERVERBIN)/daemon
-       $(INSTALL_BIN) cups-polld $(SERVERBIN)/daemon
        if test "x$(SYMROOT)" != "x"; then \
                $(INSTALL_DIR) $(SYMROOT); \
                for file in $(PROGRAMS); do \
                        cp $$file $(SYMROOT); \
+                       dsymutil $(SYMROOT)/$$file; \
                done \
        fi
 
@@ -232,9 +241,11 @@ install-exec:
 #
 
 install-headers:
-       echo Installing header files in $(INCLUDEDIR)/cups...
-       $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
-       $(INSTALL_DATA) mime.h $(INCLUDEDIR)/cups
+       if test "x$(privateinclude)" != x; then \
+               echo Installing private header files into $(PRIVATEINCLUDE)...; \
+               $(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \
+               $(INSTALL_DATA) mime.h $(PRIVATEINCLUDE); \
+       fi
 
 
 #
@@ -245,7 +256,7 @@ install-libs: $(INSTALLSTATIC)
        echo Installing libraries in $(LIBDIR)...
        $(INSTALL_DIR) -m 755 $(LIBDIR)
        $(INSTALL_LIB) $(LIBCUPSMIME) $(LIBDIR)
-       if test $(LIBCUPSMIME) = "libcupsmime.so.1" -o $(LIBCUPSMIME) = "libcupsmime.sl.1"; then \
+       if test $(LIBCUPSMIME) = "libcupsmime.so.1"; then \
                $(RM) $(LIBDIR)/`basename $(LIBCUPSMIME) .1`; \
                $(LN) $(LIBCUPSMIME) $(LIBDIR)/`basename $(LIBCUPSMIME) .1`; \
        fi
@@ -256,6 +267,7 @@ install-libs: $(INSTALLSTATIC)
        if test "x$(SYMROOT)" != "x"; then \
                $(INSTALL_DIR) $(SYMROOT); \
                cp $(LIBCUPSMIME) $(SYMROOT); \
+               dsymutil $(SYMROOT)/$(LIBCUPSMIME); \
        fi
 
 installstatic:
@@ -276,8 +288,6 @@ uninstall:
        $(RM) $(SERVERBIN)/daemon/cups-driverd
        $(RM) $(SERVERBIN)/daemon/cups-exec
        $(RM) $(SERVERBIN)/daemon/cups-lpd
-       $(RM) $(SERVERBIN)/daemon/cups-polld
-       $(RM) $(BUILDROOT)/System/Library/Printers/Libraries/convert
        -$(RMDIR) $(STATEDIR)/certs
        -$(RMDIR) $(STATEDIR)
        -$(RMDIR) $(SERVERROOT)/ppd
@@ -294,16 +304,15 @@ uninstall:
        $(RM) $(LIBDIR)/libcupsmime.1.dylib
        $(RM) $(LIBDIR)/libcupsmime.a
        $(RM) $(LIBDIR)/libcupsmime.dylib
-       $(RM) $(LIBDIR)/libcupsmime_s.a
-       $(RM) $(LIBDIR)/libcupsmime.sl
-       $(RM) $(LIBDIR)/libcupsmime.sl.1
        $(RM) $(LIBDIR)/libcupsmime.so
        $(RM) $(LIBDIR)/libcupsmime.so.1
        -$(RMDIR) $(LIBDIR)
-       $(RM) $(INCLUDEDIR)/cups/mime.h
-       -$(RMDIR) $(INCLUDEDIR)/cups
-       echo Uninstalling startup script...
+       -if test "x$(privateinclude)" != x; then \
+               $(RM) $(PRIVATEINCLUDE)/mime.h; \
+               $(RMDIR) $(PRIVATEINCLUDE); \
+       fi
        if test "x$(INITDIR)" != x; then \
+               echo Uninstalling init scripts...; \
                $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \
                $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \
                $(RM)  $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
@@ -315,23 +324,24 @@ uninstall:
                $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
                $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
        fi
-       if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
-               if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
-                       $(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \
-                       $(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
-                       $(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
-                       $(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
-               elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
-                       $(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cupsd.plist; \
-                       $(RM) $(BUILDROOT)$(INITDDIR)/org.cups.cups-lpd.plist; \
-                       $(RMDIR) $(BUILDROOT)/System/Library/StartupItems/PrintingServices; \
-               else \
-                       $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
-               fi \
+       if test "x$(INITDDIR)" != x; then \
+               echo Uninstalling startup script...; \
+               $(RM) $(BUILDROOT)$(INITDDIR)/cups.sh; \
                $(RMDIR) $(BUILDROOT)$(INITDDIR); \
        fi
+       if test "x$LAUNCHD_DIR" != x; then \
+               echo Uninstalling launchd files...; \
+               $(RM) $(BUILDROOT)$(LAUNCHD_DIR)/org.cups.cupsd.plist; \
+               $(RM) $(BUILDROOT)$(LAUNCHD_DIR)/org.cups.cups-lpd.plist; \
+       fi
+       if test "x$SYSTEMD_DIR" != x; then \
+               echo Uninstalling systemd files...; \
+               $(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.path; \
+               $(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.service; \
+               $(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.socket; \
+       fi
        if test "x$(SMFMANIFESTDIR)" != x; then \
-               echo Uninstalling SMF manifest in $(SMFMANIFESTDIR)...;\
+               echo Uninstalling SMF manifest file...;\
                $(RM) $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
        fi
        if test "x$(XINETD)" != x; then \
@@ -340,28 +350,6 @@ uninstall:
        fi
 
 
-#
-# Automatic API help files...
-#
-
-apihelp:
-       mxmldoc --section "Programming" \
-               --title "MIME API" \
-               --css ../doc/cups-printable.css \
-               --header api-mime.header --intro api-mime.shtml \
-               mime.h $(LIBOBJS:.o=.c) >../doc/help/api-mime.html
-       mxmldoc --tokens help/api-mime.html api-mime.xml >../doc/help/api-mime.tokens
-       $(RM) api-mime.xml
-
-framedhelp:
-       mxmldoc --framed api-mime \
-               --section "Programming" \
-               --title "MIME API" \
-               --css ../doc/cups-printable.css \
-               --header api-mime.header --intro api-mime.shtml \
-               mime.h $(LIBOBJS:.o=.c)
-
-
 #
 # Make the scheduler executable, "cupsd".
 #
@@ -370,16 +358,16 @@ cupsd:    $(CUPSDOBJS) $(LIBCUPSMIME) ../cups/$(LIBCUPS)
        echo Linking $@...
        $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \
                $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
-               $(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \
-               $(LIBGSSAPI) $(LIBWRAP)
+               $(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(ONDEMANDLIBS) \
+                $(DNSSDLIBS) $(LIBS) $(LIBGSSAPI) $(LIBWRAP)
 
 cupsd-static:  $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC)
        echo Linking $@...
        $(CC) $(LDFLAGS) -o cupsd-static $(CUPSDOBJS) libcupsmime.a \
                $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
                ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
-               $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \
-               $(LIBWRAP)
+               $(LIBMALLOC) $(SERVERLIBS) $(ONDEMANDLIBS) $(DNSSDLIBS) \
+                $(LIBGSSAPI) $(LIBWRAP)
 
 
 #
@@ -392,6 +380,12 @@ cupsfilter:        cupsfilter.o $(LIBCUPSMIME) ../cups/$(LIBCUPS)
        $(RM) convert
        $(LN) cupsfilter convert
 
+cupsfilter-static:     cupsfilter.o libcupsmime.a ../cups/$(LIBCUPSSTATIC)
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o cupsfilter-static cupsfilter.o libcupsmime.a \
+               ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(SSLLIBS) \
+               $(DNSSDLIBS) $(LIBGSSAPI)
+
 
 #
 # Make the device daemon, "cups-deviced".
@@ -431,10 +425,10 @@ cups-lpd: cups-lpd.o ../cups/$(LIBCUPS)
 
 
 #
-# libcupsmime.so.1, libcupsmime.sl.1
+# libcupsmime.so.1
 #
 
-libcupsmime.so.1 libcupsmime.sl.1:     $(LIBOBJS)
+libcupsmime.so.1     $(LIBOBJS)
        echo Linking $@...
        $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBS)
        $(RM) `basename $@ .1`
@@ -457,17 +451,6 @@ libcupsmime.1.dylib:       $(LIBOBJS) libcupsmime.exp
        $(LN) $@ libcupsmime.dylib
 
 
-#
-# libcupsmime_s.a
-#
-
-libcupsmime_s.a:       $(LIBOBJS)
-       echo Creating $@...
-       $(DSO) $(DSOFLAGS) -o libcupsmime_s.o $(LIBOBJS) $(LIBS)
-       $(RM) $@
-       $(AR) $(ARFLAGS) $@ libcupsmime_s.o
-
-
 #
 # libcupsmime.la
 #
@@ -538,7 +521,7 @@ testsub:    testsub.o ../cups/$(LIBCUPSSTATIC)
 
 sloc:
        echo "cupsd: \c"
-       sloccount $(CUPSDOBJS:.o=.c) $(LIBOBJS:.o=.c) cups-driverd.cxx cups-polld.c cups-lpd.c 2>/dev/null | grep "Total Physical" | awk '{print $$9}'
+       sloccount $(CUPSDOBJS:.o=.c) $(LIBOBJS:.o=.c) cups-driverd.cxx cups-lpd.c 2>/dev/null | grep "Total Physical" | awk '{print $$9}'
 
 
 #
@@ -546,8 +529,3 @@ sloc:
 #
 
 include Dependencies
-
-
-#
-# End of "$Id: Makefile 7875 2008-08-27 22:53:31Z mike $".
-#