$(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
+
+
+#
+# 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
# 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!"
#