]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - driver/Makefile
Merge changes from CUPS 1.4svn-r7874.
[thirdparty/cups.git] / driver / Makefile
index ea4240acbba96a03bf44843a73d25898882c1b4c..998501e881fd1f87cd9dba748eff63fbf616965e 100644 (file)
@@ -49,18 +49,20 @@ OBJS                = \
                $(LIB32OBJS) \
                $(LIB64OBJS)
 
-TARGETS                = \
+LIBTARGETS =   \
                $(LIBCUPSDRIVER) \
                $(LIB32CUPSDRIVER) \
                $(LIB64CUPSDRIVER) \
                libcupsdriver.a \
-               commandtoescpx \
-               commandtopclx \
-               rastertoescpx \
-               rastertopclx \
                testcmyk \
                testdither \
                testrgb
+TARGETS =      \
+               $(LIBTARGETS) \
+               commandtoescpx \
+               commandtopclx \
+               rastertoescpx \
+               rastertopclx
 
 
 #
@@ -70,6 +72,20 @@ TARGETS              = \
 all:           $(TARGETS)
 
 
+#
+# Make library targets...
+#
+
+libs:          $(LIBTARGETS)
+
+
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean everything...
 #
@@ -78,7 +94,7 @@ clean:
        $(RM) $(OBJS) core
        $(RM) *.bck core.*
        $(RM) $(TARGETS)
-       $(RM) -r images
+       $(RM) -r test
        $(RM) libcupsdriver.so libcupsdriver.sl libcupsdriver.dylib
        $(RM) -r 32bit 64bit
 
@@ -268,30 +284,37 @@ rastertopclx:             rastertopclx.o pcl-common.o $(LIBCUPSDRIVER) \
 
 
 #
-# testcmyk, test cmyk separation functions.
+# test, make a common test subdirectory for the other test programs.
 #
 
-testcmyk:              testcmyk.o libcupsdriver.a ../cups/libcups.a
-       echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ testcmyk.o libcupsdriver.a ../cups/libcups.a \
-               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+test:
        if test ! -d test; then \
+               rm -rf test; \
                mkdir test; \
        fi
-       ./testcmyk > test/testcmyk.log 2>&1
+
+
+#
+# testcmyk, test cmyk separation functions.
+#
+
+testcmyk:              test testcmyk.o libcupsdriver.a ../cups/libcups.a
+       echo Linking $@...
+       $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcmyk.o libcupsdriver.a \
+               ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+       echo Running CMYK API tests...
+       ./testcmyk > test/testcmyk.log
 
 
 #
 # testdither, test dithering functions.
 #
 
-testdither:            testdither.o libcupsdriver.a ../cups/libcups.a
+testdither:            test testdither.o libcupsdriver.a ../cups/libcups.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ testdither.o libcupsdriver.a ../cups/libcups.a \
-               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
-       if test ! -d test; then \
-               mkdir test; \
-       fi
+       $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testdither.o libcupsdriver.a \
+               ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+       echo Running dither API tests...
        ./testdither > test/0-255.pgm 2>test/0-255.log
        ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log
        ./testdither 0 85 170 255 > test/0-85-170-255.pgm 2>test/0-85-170-255.log
@@ -306,14 +329,12 @@ testdither:               testdither.o libcupsdriver.a ../cups/libcups.a
 # testrgb, test RGB separation functions.
 #
 
-testrgb:               testrgb.o libcupsdriver.a ../cups/libcups.a
+testrgb:               test testrgb.o libcupsdriver.a ../cups/libcups.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ testrgb.o libcupsdriver.a ../cups/libcups.a \
-               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
-       if test ! -d test; then \
-               mkdir test; \
-       fi
-       ./testrgb > test/testrgb.log 2>&1
+       $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testrgb.o libcupsdriver.a \
+               ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+       echo Running RGB API tests...
+       ./testrgb > test/testrgb.log 2>&1 || echo "RGB tests failed!"
 
 
 #