#
-# "$Id: Makefile 5192 2006-02-27 03:08:47Z mike $"
+# "$Id$"
#
# Filter makefile for the Common UNIX Printing System (CUPS).
#
include ../Makedefs
-FILTERS = gziptoany hpgltops texttops pstops imagetops imagetoraster \
+FILTERS = gziptoany hpgltops texttops pstops $(IMGFILTERS) \
rastertolabel rastertoepson rastertohp
-TARGETS = $(FILTERS) testraster
+TARGETS = $(FILTERS) \
+ $(LIBCUPSIMAGE) \
+ libcupsimage.a \
+ $(LIB32CUPSIMAGE) \
+ $(LIB64CUPSIMAGE) \
+ rasterbench \
+ testimage \
+ testraster
HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
image-photocd.o image-pix.o image-png.o image-pnm.o \
image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
image-zoom.o image.o interpret.o raster.o
+IMAGE32OBJS = $(IMAGEOBJS:.o=.32.o)
+IMAGE64OBJS = $(IMAGEOBJS:.o=.64.o)
FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o
OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
- imagetops.o imagetoraster.o common.o pstops.o raster.o \
- rastertolabel.o rastertoepson.o rastertohp.o \
- texttops.o textcommon.o testraster.o gziptoany.o
+ gziptoany.o imagetops.o imagetoraster.o common.o pstops.o \
+ rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
+ testimage.o testraster.o textcommon.o texttops.o
#
# Make all targets...
#
-all: $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a
+all: $(TARGETS)
#
#
clean:
- $(RM) $(OBJS) $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a
- $(RM) `basename $(LIBCUPSIMAGE) .2` libcupsimage.dylib
+ $(RM) $(OBJS) $(TARGETS)
+ $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
+ $(RM) -r 32bit 64bit
#
#
depend:
- makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
+ touch Dependencies.tmp
+ makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
+ $(RM) Dependencies
+ cp Dependencies.tmp Dependencies
+ sed -r -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
+ sed -r -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
+ $(RM) Dependencies.tmp
#
# Install all targets...
#
-install: all installhdrs $(INSTALLSTATIC)
+install: all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
$(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
for file in $(FILTERS); do \
$(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
installstatic:
$(INSTALL_DIR) -m 755 $(LIBDIR)
- -if test $(LIBCUPSIMAGE) != "libcupsimage.a"; then \
- $(INSTALL_LIB) libcupsimage.a $(LIBDIR); \
- $(RANLIB) $(LIBDIR)/libcupsimage.a; \
- fi
+ $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
+ $(RANLIB) $(LIBDIR)/libcupsimage.a;
installhdrs:
$(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
$(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
$(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups
+install32bit:
+ $(INSTALL_DIR) -m 755 $(LIB32DIR)
+ $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2
+ $(LN) libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so
+
+install64bit:
+ $(INSTALL_DIR) -m 755 $(LIB64DIR)
+ $(INSTALL_LIB) 64bit/libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so.2
+ $(LN) libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so
+
+
+#
+# Uninstall all targets...
+#
+
+uninstall: $(UNINSTALL32) $(UNINSTALL64)
+ for file in $(FILTERS); do \
+ $(RM) $(SERVERBIN)/filter/$$file; \
+ done
+ $(RM) $(SERVERBIN)/filter/rastertodymo
+ -$(RMDIR) $(SERVERBIN)/filter
+ -$(RMDIR) $(SERVERBIN)
+ $(RM) $(LIBDIR)/libcupsimage.2.dylib
+ $(RM) $(LIBDIR)/libcupsimage.a
+ $(RM) $(LIBDIR)/libcupsimage.dylib
+ $(RM) $(LIBDIR)/libcupsimage_s.a
+ $(RM) $(LIBDIR)/libcupsimage.sl
+ $(RM) $(LIBDIR)/libcupsimage.sl.2
+ $(RM) $(LIBDIR)/libcupsimage.so
+ $(RM) $(LIBDIR)/libcupsimage.so.2
+ -$(RMDIR) $(LIBDIR)
+ $(RM) $(INCLUDEDIR)/cups/image.h
+ $(RM) $(INCLUDEDIR)/cups/raster.h
+ -$(RMDIR) $(INCLUDEDIR)/cups
+
+uninstall32bit:
+ $(RM) $(LIB32DIR)/libcupsimage.so
+ $(RM) $(LIB32DIR)/libcupsimage.so.2
+ -$(RMDIR) $(LIB32DIR)
+
+uninstall64bit:
+ $(RM) $(LIB64DIR)/libcupsimage.so
+ $(RM) $(LIB64DIR)/libcupsimage.so.2
+ -$(RMDIR) $(LIB64DIR)
+
#
# Automatic API help files...
libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
echo Linking $@...
- $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) -lm
+ $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
+ -L../cups $(LINKCUPS) -lm
$(RM) `basename $@ .2`
$(LN) $@ `basename $@ .2`
+#
+# 32bit/libcupsimage.so.2
+#
+
+32bit/libcupsimage.so.2: $(IMAGE32OBJS)
+ echo Linking 32-bit $@...
+ -mkdir 32bit
+ $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \
+ -L../cups/32bit $(LINKCUPS) -lm
+
+
+#
+# 64bit/libcupsimage.so.2
+#
+
+64bit/libcupsimage.so.2: $(IMAGE64OBJS)
+ echo Linking 64-bit $@...
+ -mkdir 64bit
+ $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \
+ -L../cups/64bit $(LINKCUPS) -lm
+
+
#
# libcupsimage.2.dylib
#
libcupsimage.2.dylib: $(IMAGEOBJS)
echo Linking $@...
- $(DSO) $(DSOFLAGS) -o $@ \
+ $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
-install_name $(libdir)/$@ \
-current_version 2.2.0 \
-compatibility_version 2.0.0 \
# libcupsimage_s.a
#
-libcupsimage_s.a: $(IMAGEOBJS)
+libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
echo Linking $@...
- $(DSO) $(DSOFLAGS) -Wl,-berok -o libcupsimage_s.o $(IMAGEOBJS) \
- $(DSOLIBS) -lm
+ $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
+ -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm
$(RM) $@
$(AR) $(ARFLAGS) $@ libcupsimage_s.o
libcupsimage.la: $(IMAGEOBJS)
echo Linking $@...
- $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
+ $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
+ -L../cups $(LINKCUPS) \
-rpath $(LIBDIR) -version-info 2:2
$(CC) $(LDFLAGS) -o $@ testraster.o raster.o
+#
+# rasterbench
+#
+
+rasterbench: rasterbench.o raster.o
+ echo Linking $@...
+ $(CC) $(LDFLAGS) -o $@ rasterbench.o raster.o
+
+
#
# texttops
#
#
-# End of "$Id: Makefile 5192 2006-02-27 03:08:47Z mike $".
+# End of "$Id$".
#