$(LIB32OBJS) \
$(LIB64OBJS)
-TARGETS = \
+LIBTARGETS = \
$(LIBCUPSDRIVER) \
$(LIB32CUPSDRIVER) \
$(LIB64CUPSDRIVER) \
libcupsdriver.a \
- commandtoescpx \
- commandtopclx \
- rastertoescpx \
- rastertopclx \
testcmyk \
testdither \
testrgb
+TARGETS = \
+ $(LIBTARGETS) \
+ commandtoescpx \
+ commandtopclx \
+ rastertoescpx \
+ rastertopclx
#
all: $(TARGETS)
+#
+# Make library targets...
+#
+
+libs: $(LIBTARGETS)
+
+
+#
+# Make unit tests...
+#
+
+unittests:
+
+
#
# Clean everything...
#
$(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
#
-# 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 || echo "CMYK tests failed!"
+
+
+#
+# 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
- ./testdither > test/0-255.pgm 2>test/0-255.log || echo "Dither 0-255 test failed!"
- ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log || echo "Dither 0-127-255 test failed!"
- ./testdither 0 85 170 255 > test/0-85-170-255.pgm 2>test/0-85-170-255.log || echo "Dither 0-85-170-255 test failed!"
- ./testdither 0 63 127 170 198 227 255 > test/0-63-127-170-198-227-255.pgm 2>test/0-63-127-170-198-227-255.log || echo "Dither 0-63-127-170-198-227-255 test failed!"
- ./testdither 0 210 383 > test/0-210-383.pgm 2>test/0-210-383.log || echo "Dither 0-210-383 test failed!"
- ./testdither 0 82 255 > test/0-82-255.pgm 2>test/0-82-255.log || echo "Dither 0-82-255 test failed!"
- ./testdither 0 510 > test/0-510.pgm 2>test/0-510.log || echo "Dither 0-510 test failed!"
- ./testdither 0 1020 > test/0-1020.pgm 2>test/0-1020.log || echo "Dither 0-1020 test failed!"
+ $(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
+ ./testdither 0 63 127 170 198 227 255 > test/0-63-127-170-198-227-255.pgm 2>test/0-63-127-170-198-227-255.log
+ ./testdither 0 210 383 > test/0-210-383.pgm 2>test/0-210-383.log
+ ./testdither 0 82 255 > test/0-82-255.pgm 2>test/0-82-255.log
+ ./testdither 0 510 > test/0-510.pgm 2>test/0-510.log
+ ./testdither 0 1020 > test/0-1020.pgm 2>test/0-1020.log
#
# 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
+ $(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!"