#
-# "$Id$"
+# Makefile for the CUPS PPD Compiler.
#
-# Makefile for the CUPS PPD Compiler.
+# Copyright 2007-2017 by Apple Inc.
+# Copyright 2002-2006 by Easy Software Products.
#
-# Copyright 2007-2010 by Apple Inc.
-# Copyright 2002-2006 by Easy Software Products.
-#
-# 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
+# missing or damaged, see the license at "http://www.cups.org/".
#
#
TARGETS = \
$(LIBTARGETS) \
$(EXECTARGETS) \
- genstrings
+ $(LOCALTARGET)
#
clean:
$(RM) $(OBJS) core
$(RM) *.bak *.bck core.*
- $(RM) $(TARGETS) $(UNITTARGETS)
+ $(RM) $(TARGETS) $(UNITTARGETS) genstrings
$(RM) -r ppd ppd2
$(RM) sample-import.drv sample.c test.drv
- $(RM) libcupsppdc.so libcupsppdc.sl libcupsppdc.dylib
+ $(RM) libcupsppdc.so libcupsppdc.dylib
#
#
depend:
- makedepend -Y -I.. -fDependencies $(OBJS:.o=.cxx) >/dev/null 2>&1
+ $(CXX) -MM $(ALL_CXXFLAGS) $(OBJS:.o=.cxx) >Dependencies
#
$(INSTALL_DIR) $(SYMROOT); \
for file in $(EXECTARGETS); do \
cp $$file $(SYMROOT); \
+ dsymutil $(SYMROOT)/$$file; \
done \
fi
#
install-headers:
- echo Installing header files in $(INCLUDEDIR)/cups...
- $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
- $(INSTALL_DATA) ppdc.h $(INCLUDEDIR)/cups
+ if test "x$(privateinclude)" != x; then \
+ echo Installing private header files into $(PRIVATEINCLUDE)...; \
+ $(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \
+ $(INSTALL_DATA) ppdc.h $(PRIVATEINCLUDE); \
+ fi
#
echo Installing libraries in $(LIBDIR)...
$(INSTALL_DIR) -m 755 $(LIBDIR)
$(INSTALL_LIB) $(LIBCUPSPPDC) $(LIBDIR)
- if test $(LIBCUPSPPDC) = "libcupsppdc.so.1" -o $(LIBCUPSPPDC) = "libcupsppdc.sl.1"; then \
+ if test $(LIBCUPSPPDC) = "libcupsppdc.so.1"; then \
$(RM) $(LIBDIR)/`basename $(LIBCUPSPPDC) .1`; \
$(LN) $(LIBCUPSPPDC) $(LIBDIR)/`basename $(LIBCUPSPPDC) .1`; \
fi
if test "x$(SYMROOT)" != "x"; then \
$(INSTALL_DIR) $(SYMROOT); \
cp $(LIBCUPSPPDC) $(SYMROOT); \
+ dsymutil $(SYMROOT)/$(LIBCUPSPPDC); \
fi
installstatic:
$(RM) $(LIBDIR)/libcupsppdc.1.dylib
$(RM) $(LIBDIR)/libcupsppdc.a
$(RM) $(LIBDIR)/libcupsppdc.dylib
- $(RM) $(LIBDIR)/libcupsppdc_s.a
- $(RM) $(LIBDIR)/libcupsppdc.sl
- $(RM) $(LIBDIR)/libcupsppdc.sl.1
$(RM) $(LIBDIR)/libcupsppdc.so
$(RM) $(LIBDIR)/libcupsppdc.so.1
-$(RMDIR) $(LIBDIR)
- $(RM) $(INCLUDEDIR)/cups/ppdc.h
- -$(RMDIR) $(INCLUDEDIR)/cups
+ -if test "x$(privateinclude)" != x; then \
+ $(RM) $(PRIVATEINCLUDE)/ppdc.h; \
+ $(RMDIR) $(PRIVATEINCLUDE); \
+ fi
#
-# Automatic API help files...
+# Local programs (not built when cross-compiling...)
#
-apihelp:
- mxmldoc --section "Programming" \
- --title "PPD Compiler API" \
- --css ../doc/cups-printable.css \
- --header api-ppdc.header --intro api-ppdc.shtml \
- api-ppdc.xml \
- ppdc.h $(LIBOBJS:.o=.cxx) >../doc/help/api-ppdc.html
- mxmldoc --tokens help/api-ppdc.html api-ppdc.xml >../doc/help/api-ppdc.tokens
- $(RM) api-ppdc.xml
-
-framedhelp:
- mxmldoc --framed api-ppdc \
- --section "Programming" \
- --title "PPD Compiler API" \
- --css ../doc/cups-printable.css \
- --header api-ppdc.header --intro api-ppdc.shtml \
- ppdc.h $(LIBOBJS:.o=.cxx)
+local: genstrings
#
$(CXX) $(LDFLAGS) -o $@ ppdc.o -L. -lcupsppdc $(LIBS)
-ppdc-static: ppdc.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) foo.drv foo-fr.po
+ppdc-static: ppdc.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) foo.drv foo-fr.po
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o ppdc-static ppdc.o libcupsppdc.a \
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
echo Testing PPD importer...
$(RM) -r ppd ppd2 sample-import.drv
- ./ppdc-static -I ../data sample.drv
+ ./ppdc-static -l en -I ../data sample.drv
./ppdi-static -I ../data -o sample-import.drv ppd/*
- ./ppdc-static -I ../data -d ppd2 sample-import.drv
- if diff -qr ppd ppd2; then \
+ ./ppdc-static -l en -I ../data -d ppd2 sample-import.drv
+ if diff -r ppd ppd2 >/dev/null; then \
echo PPD import OK; \
else \
echo PPD import FAILED; \
#
-# libcupsppdc.so.1, libcupsppdc.sl.1
+# libcupsppdc.so.1
#
-libcupsppdc.so.1 libcupsppdc.sl.1: $(LIBOBJS) ../cups/$(LIBCUPS)
+libcupsppdc.so.1: $(LIBOBJS) ../cups/$(LIBCUPS)
echo Linking $@...
$(DSOXX) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LINKCUPS)
$(RM) `basename $@ .1`
libcupsppdc.1.dylib: $(LIBOBJS) ../cups/$(LIBCUPS)
echo Creating export list for $@...
- nm $(LIBOBJS) | grep "T __" | awk '{print $$3}' | sort >t.exp
+ nm -gm $(LIBOBJS) | grep "__text" | grep -v weak | awk '{print $$NF}' | sort >t.exp
echo Linking $@...
$(DSOXX) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
-install_name $(libdir)/$@ \
-current_version 1.0.0 \
-compatibility_version 1.0.0 \
-exported_symbols_list t.exp \
- $(LIBOBJS) $(LINKCUPS)
+ $(LIBOBJS) $(LINKCUPS) $(COMMONLIBS)
$(RM) libcupsppdc.dylib t.exp
$(LN) $@ libcupsppdc.dylib
-#
-# libcupsppdc_s.a
-#
-
-libcupsppdc_s.a: $(LIBOBJS) ../cups/$(LIBCUPS)
- echo Creating $@...
- $(DSOXX) $(DSOFLAGS) -o libcupsppdc_s.o $(LIBOBJS) $(LINKCUPS)
- $(RM) $@
- $(AR) $(ARFLAGS) $@ libcupsppdc_s.o
-
-
#
# libcupsppdc.la
#
#
include Dependencies
-
-
-#
-# End of "$Id$".
-#