diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-04-13 20:01:18 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-04-13 20:01:18 +0000 |
commit | cb0bf68aa475ddb96b0ecc3ac3676ad9f5598b59 (patch) | |
tree | a55bb883fb941ff7a483bcb76138d70b2149822b | |
parent | 24d2e20391c5949c20bc419ab9e4974541011294 (diff) | |
download | netpbm-mirror-cb0bf68aa475ddb96b0ecc3ac3676ad9f5598b59.tar.gz netpbm-mirror-cb0bf68aa475ddb96b0ecc3ac3676ad9f5598b59.tar.xz netpbm-mirror-cb0bf68aa475ddb96b0ecc3ac3676ad9f5598b59.zip |
Add Windows icon capability, centralize make rule for link of programs
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2182 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rwxr-xr-x | buildtools/configure.pl | 18 | ||||
-rw-r--r-- | common.mk | 13 | ||||
-rw-r--r-- | config.mk.in | 5 | ||||
-rw-r--r-- | converter/other/Makefile | 126 | ||||
-rw-r--r-- | converter/other/cameratopam/Makefile | 14 | ||||
-rw-r--r-- | converter/other/fiasco/Makefile | 16 | ||||
-rw-r--r-- | converter/other/jbig/Makefile | 11 | ||||
-rw-r--r-- | converter/other/jpeg2000/Makefile | 13 | ||||
-rw-r--r-- | converter/other/pamtosvg/Makefile | 32 | ||||
-rw-r--r-- | converter/other/pnmtopalm/Makefile | 16 | ||||
-rw-r--r-- | converter/other/pnmtopalm/gen_palm_colormap.c | 4 | ||||
-rw-r--r-- | converter/pbm/pbmtoppa/Makefile | 17 | ||||
-rw-r--r-- | converter/ppm/ppmtompeg/Makefile | 62 | ||||
-rw-r--r-- | doc/HISTORY | 3 | ||||
-rw-r--r-- | editor/pamflip/Makefile | 13 | ||||
-rw-r--r-- | icon/Makefile | 24 | ||||
-rw-r--r-- | icon/netpbm.ico | bin | 0 -> 3774 bytes | |||
-rw-r--r-- | icon/netpbm.ppm | 12 | ||||
-rw-r--r-- | other/Makefile | 11 | ||||
-rw-r--r-- | other/pamx/Makefile | 24 |
20 files changed, 228 insertions, 206 deletions
diff --git a/buildtools/configure.pl b/buildtools/configure.pl index 056b705d..44493ca1 100755 --- a/buildtools/configure.pl +++ b/buildtools/configure.pl @@ -1048,6 +1048,19 @@ sub getSse($) { } +sub getIcon($$) { + + my ($platform, $wantIconR) = @_; + + if ($platform eq 'WINDOWS') { + print("Include an icon in each executable?\n"); + $$wantIconR = promptYesNo("y"); + } else { + $$wantIconR = $FALSE; + } +} + + # TODO: These should do test compiles to see if the headers are in the # default search path, both to create a default to offer and to issue a @@ -2082,6 +2095,8 @@ getSse(\my $wantSse); findProcessManagement(\my $dontHaveProcessMgmt); +getIcon($platform, \my $wantIcon); + #****************************************************************************** # # FIND THE PREREQUISITE LIBRARIES @@ -2370,6 +2385,9 @@ if ($platform eq "GNU") { if ($subplatform ne "cygwin") { push(@config_mk, "MSVCRT = Y\n"); } + if ($wantIcon) { + push(@config_mk, 'WINICON_OBJECT = $(BUILDDIR)/icon.netpbm.o'); + } } elsif ($platform eq "BEOS") { push(@config_mk, "LDSHLIB = -nostart\n"); } elsif ($platform eq "OPENBSD") { diff --git a/common.mk b/common.mk index 51fbc438..54a1484c 100644 --- a/common.mk +++ b/common.mk @@ -287,6 +287,10 @@ $(BUNDLED_URTLIB): $(BUILDDIR)/urt SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) endif +$(BUILDDIR)/icon/netpbm.o: $(BUILDDIR)/icon + $(MAKE) -C $(dir $@) -f $(SRCDIR)/icon/Makefile \ + SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) + # Here are some notes from Nelson H. F. Beebe on April 16, 2002: # # There are at least three incompatible kinds of command-line options @@ -371,11 +375,12 @@ MATHLIB ?= -lm # Note that LDFLAGS might contain -L options, so order is important. # LDFLAGS is commonly set as an environment variable. -LDFLAGS_ALL = $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(LDFLAGS) $(LDLIBS) $(MATHLIB) $(RPATH) $(LADD) +LDFLAGS_ALL = $(shell $(LIBOPT) $(NETPBMLIB)) $(WINICON_OBJECT) \ + $(LDFLAGS_TARGET) $(LDFLAGS) $(LDLIBS) $(MATHLIB) $(RPATH) $(LADD) -$(PORTBINARIES) $(MATHBINARIES): %: %.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o $(LDFLAGS_ALL) +$(PORTBINARIES) $(MATHBINARIES): %: %.o \ + $(NETPBMLIB) $(LIBOPT) $(WINICON_OBJECT) + $(LD) -o $@ $@.o $(ADDL_OBJECTS) $(LDFLAGS_ALL) # MERGE STUFF diff --git a/config.mk.in b/config.mk.in index 7760bfb5..b10ddbb3 100644 --- a/config.mk.in +++ b/config.mk.in @@ -503,6 +503,11 @@ LINUXSVGAHDR_DIR = #LINUXSVGALIB = /usr/lib/libvga.so #LINUXSVGAHDR_DIR = /usr/include/vgalib +# WINICON_OBJECT is the object file to bind into all Netpbm executables +# to provide the icon for Windows to use for it. Null for none. +WINICON_OBJECT = +#WINICON_OBJECT = $(BUILDDIR)/icon/netpbm.o + # If you don't want any network functions, set OMIT_NETWORK to "Y". # The only thing that requires network functions is the option in # ppmtompeg to run it on multiple computers simultaneously. On some diff --git a/converter/other/Makefile b/converter/other/Makefile index 1a44017f..7aefda12 100644 --- a/converter/other/Makefile +++ b/converter/other/Makefile @@ -117,46 +117,38 @@ PORTBINARIES = avstopam bmptopnm fitstopnm \ gemtopnm giftopnm hdifftopam infotopam \ pamtoavs pamtodjvurle pamtofits pamtogif \ pamtohdiff pamtohtmltbl pamtompfont pamtooctaveimg \ - pamtopam pamtopfm pamtopnm pamtouil \ + pamtopam pamtopdbimg pamtopfm pamtopnm pamtosrf pamtouil \ pamtowinicon pamtoxvmini \ - pbmtopgm pfmtopam \ + pbmtopgm pdbimgtopam pfmtopam \ pgmtopbm pgmtoppm ppmtopgm pnmtoddif \ - pnmtopclxl \ + pnmtopclxl pnmtorast \ pnmtosgi pnmtosir pamtotga pnmtoxwd \ - rlatopam sgitopnm sirtopnm sunicontopnm \ + rasttopnm rlatopam sgitopnm sirtopnm srftopam sunicontopnm \ winicontopam xwdtopnm zeisstopnm -BINARIES = \ - $(PORTBINARIES) \ - pamtopdbimg \ - pamtosrf \ - pdbimgtopam \ - pnmtorast \ - rasttopnm \ - srftopam \ - ifneq ($(DONT_HAVE_PROCESS_MGMT),Y) PORTBINARIES += pstopnm - BINARIES += pnmtops endif ifeq ($(HAVE_PNGLIB),Y) - BINARIES += pnmtopng pngtopam pamrgbatopng + PORTBINARIES += pnmtopng pngtopam pamrgbatopng endif ifneq ($(JPEGLIB),NONE) - BINARIES += jpegtopnm pnmtojpeg + PORTBINARIES += jpegtopnm pnmtojpeg endif ifneq ($(TIFF_PREREQ_MISSING),Y) - BINARIES += tifftopnm pamtotiff pnmtotiffcmyk + PORTBINARIES += tifftopnm pamtotiff pnmtotiffcmyk endif ifneq ($(URTLIB),NONE) - BINARIES += rletopnm pnmtorle + PORTBINARIES += rletopnm pnmtorle endif ifneq ($(XML2_LIBS),NONE) - BINARIES += svgtopam + PORTBINARIES += svgtopam endif +BINARIES = $(PORTBINARIES) + MERGEBINARIES = $(BINARIES) EXTRA_OBJECTS = exif.o rast.o ipdb.o srf.o @@ -189,12 +181,14 @@ else LIBOPTR = endif -LIBOPTS_TIFF = $(shell $(LIBOPT) $(NETPBMLIB) \ +LIBOPTS_TIFF = $(shell $(LIBOPT) \ $(LIBOPTR) $(TIFFLIB) $(TIFFLIB_EXTRALIBS)) -tifftopnm pamtotiff pnmtotiffcmyk: %: %.o tiff.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o tiff.o \ - $(LIBOPTS_TIFF) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) +tifftopnm pamtotiff pnmtotiffcmyk: tiff.o +tifftopnm pamtotiff pnmtotiffcmyk: ADDL_OBJECTS = tiff.o +tifftopnm pamtotiff pnmtotiffcmyk: \ + LDFLAGS_TARGET = \ + $(shell $(LIBOPT) $(LIBOPTR) $(TIFFLIB) $(TIFFLIB_EXTRALIBS)) ifneq ($(shell $(TEST_PKGCONFIG_LIBPNG)),) # pkg-config libpng works on this system @@ -209,66 +203,44 @@ else endif endif -pngtopam: %: %.o pngx.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o pngx.o \ - $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(PNGLIB_LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -pnmtopng: %: %.o pngx.o pngtxt.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o pngx.o pngtxt.o \ - $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(PNGLIB_LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -pamrgbatopng: %: %.o pngx.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o pngx.o \ - $(shell $(LIBOPT) $(NETPBMLIB)) $(PNGLIB_LIBOPTS) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -jpegtopnm: %: %.o jpegdatasource.o exif.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $< jpegdatasource.o exif.o \ - $(shell $(LIBOPT) $(NETPBMLIB) $(LIBOPTR) $(JPEGLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -pnmtojpeg: %: %.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o \ - $(shell $(LIBOPT) $(NETPBMLIB) $(LIBOPTR) $(JPEGLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -srftopam pamtosrf: %: %.o srf.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o srf.o \ - $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -svgtopam: %: %.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o \ - $(shell $(LIBOPT) $(NETPBMLIB) $(LIBOPTR)) \ - $(XML2_LIBS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) +pngtopam: pngx.o +pngtopam: ADDL_OBJECTS = pngx.o +pngtopam: LDFLAGS_TARGET = $(PNGLIB_LIBOPTS) + +pnmtopng: pngx.o pngtxt.o +pnmtopng: ADDL_OBJECTS = pngx.o pngtxt.o +pnmtopng: LDFLAGS_TARGET = $(PNGLIB_LIBOPTS) + +pamrgbatopng: pngx.o +pamrgbatopng: ADDL_OBJECTS = pngx.o +pamrgbatopng: LDFLAGS_TARGET = $(PNGLIB_LIBOPTS) + +jpegtopnm: jpegdatasource.o exif.o +jpegtopnm: ADDL_OBJECTS = jpegdatasource.o exif.o +jpegtopnm: LDFLAGS_TARGET = $(shell $(LIBOPT) $(LIBOPTR) $(JPEGLIB)) + +srftopam pamtosrf: srf.o +srftopam pamtosrf: ADDL_OBJECTS = srf.o + +pnmtojpeg: LDFLAGS_TARGET = $(shell $(LIBOPT) $(LIBOPTR) $(JPEGLIB)) + +svgtopam: LDFLAGS_TARGET = $(XML2_LIBS) # If URTLIB is BUNDLED_URTLIB, then we're responsible for building it, which # means it needs to be a dependency: ifeq ($(URTLIB), $(BUNDLED_URTLIB)) - URTLIBDEP = $(URTLIB) +rletopnm pnmtorle: $(URTLIB) endif -rletopnm pnmtorle: %: %.o $(NETPBMLIB) $(URTLIBDEP) $(LIBOPT) - $(LD) -o $@ $@.o \ - $(shell $(LIBOPT) $(URTLIB) $(NETPBMLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -pnmtops: %: %.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o \ - $(shell $(LIBOPT) $(NETPBMLIB) $(PNMTOPS_ZLIB_OPT)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -pnmtorast rasttopnm: %: %.o rast.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o rast.o \ - $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -pdbimgtopam pamtopdbimg: %: %.o ipdb.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $@.o ipdb.o \ - $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) +rletopnm pnmtorle: LDFLAGS_TARGET = $(shell $(LIBOPT) $(URTLIB)) + +pnmtops: LDFLAGS_TARGET = $(shell $(LIBOPT) $(PNMTOPS_ZLIB_OPT)) + +pnmtorast rasttopnm: rast.o +pnmtorast rasttopnm: ADDL_OBJECTS = rast.o + +pdbimgtopam pamtopdbimg: ipdb.o +pdbimgtopam pamtopdbimg: ADDL_OBJECTS = ipdb.o bmptopnm.o bmptopnm.o2: bmp.h diff --git a/converter/other/cameratopam/Makefile b/converter/other/cameratopam/Makefile index 4470d472..11ca4e1d 100644 --- a/converter/other/cameratopam/Makefile +++ b/converter/other/cameratopam/Makefile @@ -19,22 +19,20 @@ include $(BUILDDIR)/config.mk .PHONY: all all: cameratopam -OBJECTS = util.o identify.o cameratopam.o camera.o foveon.o decode.o \ +ADDL_OBJECTS = util.o identify.o camera.o foveon.o decode.o \ canon.o ljpeg.o dng.o +OBJECTS = cameratopam.o $(ADDL_OBJECTS) + camera.o camera.o2: CFLAGS_TARGET = $(HAVE_JPEG_DEFINE) MERGE_OBJECTS = -BINARIES = cameratopam +PORTBINARIES = cameratopam +BINARIES = $(PORTBINARIES) MERGEBINARIES = SCRIPTS = include $(SRCDIR)/common.mk -cameratopam: $(OBJECTS) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ \ - $(OBJECTS) $(shell $(LIBOPT) $(NETPBMLIB) $(LIBOPTR)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) \ - $(RPATH) $(LADD) - +cameratopam: $(ADDL_OBJECTS) diff --git a/converter/other/fiasco/Makefile b/converter/other/fiasco/Makefile index 16221d77..392e843c 100644 --- a/converter/other/fiasco/Makefile +++ b/converter/other/fiasco/Makefile @@ -11,8 +11,9 @@ COMP_INCLUDES = \ -I$(SRCDIR)/$(SUBDIR)/codec -I$(SRCDIR)/$(SUBDIR)/input \ -I$(SRCDIR)/$(SUBDIR)/output -I$(SRCDIR)/$(SUBDIR)/lib \ -BINARIES = pnmtofiasco fiascotopnm +PORTBINARIES = pnmtofiasco fiascotopnm +BINARIES = $(PORTBINARIES) MERGEBINARIES = $(BINARIES) SCRIPTS = @@ -24,21 +25,18 @@ FIASCOLIBS = codec/libfiasco_codec.a \ output/libfiasco_output.a \ lib/libfiasco_lib.a -COMMON_OBJECTS = binerror.o getopt.o getopt1.o params.o +ADDL_OBJECTS = binerror.o getopt.o getopt1.o params.o -OBJECTS = $(BINARIES:%=%.o) $(COMMON_OBJECTS) +OBJECTS = $(BINARIES:%=%.o) $(ADDL_OBJECTS) -MERGE_OBJECTS = $(BINARIES:%=%.o2) $(COMMON_OBJECTS) $(FIASCOLIBS) +MERGE_OBJECTS = $(BINARIES:%=%.o2) $(ADDL_OBJECTS) $(FIASCOLIBS) SUBDIRS = codec input output lib include $(SRCDIR)/common.mk -$(BINARIES):%:%.o $(COMMON_OBJECTS) $(FIASCOLIBS) $(NETPBMLIB) \ - $(LIBOPT) - $(LD) -o $@ $< $(COMMON_OBJECTS) \ - $(shell $(LIBOPT) $(FIASCOLIBS) $(NETPBMLIB)) $(MATHLIB) \ - $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) +$(BINARIES):%:%.o $(ADDL_OBJECTS) $(FIASCOLIBS) +$(BINARIES): LDFLAGS_TARGET = $(shell $(LIBOPT) $(FIASCOLIBS)) codec/libfiasco_codec.a: $(BUILDDIR)/$(SUBDIR)/codec FORCE $(MAKE) -C codec -f $(SRCDIR)/$(SUBDIR)/codec/Makefile \ diff --git a/converter/other/jbig/Makefile b/converter/other/jbig/Makefile index b5f4e14a..30e634f1 100644 --- a/converter/other/jbig/Makefile +++ b/converter/other/jbig/Makefile @@ -16,10 +16,12 @@ endif ifneq ($(JBIGHDR_DIR),NONE) ifneq ($(JBIGLIB),NONE) - BINARIES = jbigtopnm pnmtojbig + PORTBINARIES = jbigtopnm pnmtojbig endif endif +BINARIES = $(PORTBINARIES) + SCRIPTS = ifeq ($(JBIGLIB),$(BUILDDIR)/$(SUBDIR)/libjbig.a) @@ -35,11 +37,8 @@ all: $(BINARIES) include $(SRCDIR)/common.mk -$(BINARIES): %: %.o $(JBIGLIB_DEP) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $< \ - $(shell $(LIBOPT) $(NETPBMLIB) $(JBIGLIB)) $(MATHLIB) \ - $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - +$(BINARIES): %: %.o $(JBIGLIB_DEP) $(LIBOPT) +$(BINARIES): LDFLAGS_TARGET = $(shell $(LIBOPT) $(JBIGLIB)) $(BUILDDIR)/$(SUBDIR)/libjbig.a: $(LIBJBIG_OBJECTS) $(AR) -rc $@ $^ diff --git a/converter/other/jpeg2000/Makefile b/converter/other/jpeg2000/Makefile index f2e3b4a1..4afe4ffd 100644 --- a/converter/other/jpeg2000/Makefile +++ b/converter/other/jpeg2000/Makefile @@ -38,16 +38,17 @@ endif ifneq ($(JASPERHDR_DIR),NONE) ifneq ($(JASPERLIB_USE),NONE) - BINARIES = pamtojpeg2k jpeg2ktopam + PORTBINARIES = pamtojpeg2k jpeg2ktopam endif endif +BINARIES = $(PORTBINARIES) OBJECTS = $(BINARIES:%=%.o) MERGE_OBJECTS = $(BINARIES:%=%.o2) ifeq ($(JASPERLIB),$(INTERNAL_JASPERLIB)) # MERGE_OBJECTS contains relative paths, so $(INTERNAL_JASPERLIB) had better - # be relative to the current relative to the current directory. + # be relative to the current directory. MERGE_OBJECTS += $(JASPERLIB) endif MERGEBINARIES = $(BINARIES) @@ -57,12 +58,10 @@ all: $(BINARIES) include $(SRCDIR)/common.mk -LIBOPTS = $(shell $(LIBOPT) $(JASPERLIB_USE) $(NETPBMLIB)) +LIBOPTS = $(shell $(LIBOPT) $(JASPERLIB_USE)) -$(BINARIES): %: %.o $(JASPERLIB_DEP) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $< \ - $(LIBOPTS) $(JASPERDEPLIBS) $(MATHLIB) $(RPATH) \ - $(LDFLAGS) $(LDLIBS) $(LADD) +$(BINARIES): %: %.o $(JASPERLIB_DEP) $(LIBOPT) +$(BINARIES): LDFLAGS_TARGET = $(LIBOPTS) $(JASPERDEPLIBS) $(INTERNAL_JASPERLIB): $(BUILDDIR)/$(SUBDIR)/libjasper FORCE $(MAKE) -f $(SRCDIR)/$(SUBDIR)/libjasper/Makefile \ diff --git a/converter/other/pamtosvg/Makefile b/converter/other/pamtosvg/Makefile index 8b033020..83f150d0 100644 --- a/converter/other/pamtosvg/Makefile +++ b/converter/other/pamtosvg/Makefile @@ -7,26 +7,13 @@ VPATH=.:$(SRCDIR)/$(SUBDIR) include $(BUILDDIR)/config.mk -BINARIES = pamtosvg +PORTBINARIES = pamtosvg -PAMTOSVG_OBJECTS = \ - pamtosvg.o \ - output-svg.o \ - fit.o \ - spline.o \ - curve.o \ - vector.o \ - epsilon-equal.o \ - autotrace.o \ - pxl-outline.o \ - bitmap.o \ - thin-image.o \ - logreport.o \ - exception.o \ - image-proc.o \ +BINARIES = $(PORTBINARIES) + +MERGEBINARIES = $(BINARIES) -MERGE_OBJECTS = \ - pamtosvg.o2 \ +ADDL_OBJECTS = \ output-svg.o \ fit.o \ spline.o \ @@ -41,15 +28,12 @@ MERGE_OBJECTS = \ exception.o \ image-proc.o \ -OBJECTS = $(PAMTOSVG_OBJECTS) +OBJECTS = pamtosvg.o $(ADDL_OBJECTS) -MERGEBINARIES = $(BINARIES) +MERGE_OBJECTS = pamtosvg.o2 $(ADDL_OBJECTS) all: $(BINARIES) include $(SRCDIR)/common.mk -pamtosvg: $(PAMTOSVG_OBJECTS) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $(PAMTOSVG_OBJECTS) \ - $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) +pamtosvg: $(ADDL_OBJECTS) diff --git a/converter/other/pnmtopalm/Makefile b/converter/other/pnmtopalm/Makefile index 65790002..edc7da64 100644 --- a/converter/other/pnmtopalm/Makefile +++ b/converter/other/pnmtopalm/Makefile @@ -8,8 +8,10 @@ VPATH=.:$(SRCDIR)/$(SUBDIR) include $(BUILDDIR)/config.mk BINARIES = palmtopnm pnmtopalm +PORTBINARIES = $(BINARIES) gen_palm_colormap SCRIPTS = -OBJECTS = $(BINARIES:%=%.o) palmcolormap.o +ADDL_OBJECTS = palmcolormap.o +OBJECTS = $(BINARIES:%=%.o) $(ADDL_OBJECTS) gen_palm_colormap.o MERGE_OBJECTS = $(BINARIES:%=%.o2) palmcolormap.o MERGEBINARIES = $(BINARIES) DATAFILES = palmcolor8.map palmgray1.map palmgray2.map palmgray4.map @@ -18,17 +20,7 @@ all: $(BINARIES) include $(SRCDIR)/common.mk -LIBOPTS = $(shell $(LIBOPT) $(NETPBMLIB)) - -$(BINARIES): %: %.o palmcolormap.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $< palmcolormap.o $(LIBOPTS) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) - -gen_palm_colormap : % : %.c palmcolormap.o - $(CC) -I importinc $(CFLAGS_ALL) -o $@ \ - $< palmcolormap.o \ - $(LIBOPTS) $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(LADD) - +$(BINARIES): $(ADDL_OBJECTS) clean: cleanspecial .PHONY: cleanspecial diff --git a/converter/other/pnmtopalm/gen_palm_colormap.c b/converter/other/pnmtopalm/gen_palm_colormap.c index c7172c6b..0f3f8a5f 100644 --- a/converter/other/pnmtopalm/gen_palm_colormap.c +++ b/converter/other/pnmtopalm/gen_palm_colormap.c @@ -3,8 +3,8 @@ * Based on an earlier version by Bill Janssen <bill@janssen.org> */ -#include "ppm.h" -#include "pm_c_util.h" +#include "netpbm/ppm.h" +#include "netpbm/pm_c_util.h" #include "palm.h" diff --git a/converter/pbm/pbmtoppa/Makefile b/converter/pbm/pbmtoppa/Makefile index 5f205230..cf31ded6 100644 --- a/converter/pbm/pbmtoppa/Makefile +++ b/converter/pbm/pbmtoppa/Makefile @@ -9,17 +9,18 @@ include $(BUILDDIR)/config.mk all: pbmtoppa -BINARIES = pbmtoppa +PORTBINARIES = pbmtoppa + +BINARIES = $(PORTBINARIES) MERGEBINARIES = $(BINARIES) -OBJECTS = pbmtoppa.o ppa.o pbm.o cutswath.o -MERGE_OBJECTS = pbmtoppa.o2 ppa.o pbm.o cutswath.o +ADDL_OBJECTS = ppa.o pbm.o cutswath.o -include $(SRCDIR)/common.mk +OBJECTS = pbmtoppa.o $(ADDL_OBJECTS) -pbmtoppa: $(OBJECTS) $(NETPBMLIB) $(LIBOPT) - $(LD) -o pbmtoppa $(OBJECTS) \ - -lm $(shell $(LIBOPT) $(NETPBMLIB)) $(LDFLAGS) $(LDLIBS) \ - $(RPATH) $(LADD) +MERGE_OBJECTS = pbmtoppa.o2 $(ADDL_OBJECTS) + +include $(SRCDIR)/common.mk +pbmtoppa: $(OBJECTS) diff --git a/converter/ppm/ppmtompeg/Makefile b/converter/ppm/ppmtompeg/Makefile index 4f244ae9..49aeb7f8 100644 --- a/converter/ppm/ppmtompeg/Makefile +++ b/converter/ppm/ppmtompeg/Makefile @@ -38,7 +38,13 @@ endif # -DHEINOUS_DEBUG_MODE # -MP_BASE_OBJS = mfwddct.o postdct.o huff.o bitio.o mheaders.o +MP_BASE_OBJS = \ + mfwddct.o \ + postdct.o \ + huff.o \ + bitio.o \ + mheaders.o \ + MP_ENCODE_OBJS = \ frames.o \ iframe.o \ @@ -46,11 +52,24 @@ MP_ENCODE_OBJS = \ bframe.o \ psearch.o \ bsearch.o \ - block.o + block.o \ + +MP_OTHER_OBJS = \ + mpeg.o \ + subsample.o \ + param.o \ + rgbtoycc.o \ + readframe.o \ + combine.o \ + jrevdct.o \ + frame.o \ + fsize.o \ + frametype.o \ + specifics.o \ + rate.o \ + opts.o \ + input.o \ -MP_OTHER_OBJS = mpeg.o subsample.o param.o rgbtoycc.o \ - readframe.o combine.o jrevdct.o frame.o fsize.o frametype.o \ - specifics.o rate.o opts.o input.o ifeq ($(OMIT_NETWORK),Y) MP_OTHER_OBJS += noparallel.o else @@ -62,14 +81,19 @@ else MP_OTHER_OBJS += gethostname.o endif -NONMAIN_OBJS = $(MP_BASE_OBJS) $(MP_OTHER_OBJS) $(MP_ENCODE_OBJS) \ - $(JPEG_MODULE).o -OBJECTS = ppmtompeg.o $(NONMAIN_OBJS) -MERGE_OBJECTS = ppmtompeg.o2 $(NONMAIN_OBJS) +ADDL_OBJECTS = \ + $(MP_BASE_OBJS) \ + $(MP_OTHER_OBJS) \ + $(MP_ENCODE_OBJS) \ + $(JPEG_MODULE).o \ + +OBJECTS = ppmtompeg.o $(ADDL_OBJECTS) +MERGE_OBJECTS = ppmtompeg.o2 $(ADDL_OBJECTS) MP_INCLUDE = mproto.h mtypes.h huff.h bitio.h MP_MISC = Makefile huff.table parse_huff.pl -BINARIES = ppmtompeg +PORTBINARIES = ppmtompeg +BINARIES = $(PORTBINARIES) MERGEBINARIES = $(BINARIES) SCRIPTS = @@ -84,18 +108,14 @@ else LIBOPTR = endif -ppmtompeg: $(OBJECTS) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ \ - $(OBJECTS) $(shell $(LIBOPT) $(NETPBMLIB) $(LIBOPTR) $(JPEGLIBX)) \ - $(NETWORKLD) $(MATHLIB) $(LDFLAGS) $(LDLIBS) \ - $(RPATH) $(LADD) - -profile: $(OBJECTS) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ -Bstatic -pg \ - $(OBJECTS) $(shell $(LIBOPT) $(NETPBMLIB) $(LIBOPTR) $(JPEGLIBX)) \ - $(NETWORKLD) $(MATHLIB) $(LDFLAGS) $(LDLIBS) \ - $(RPATH) $(LADD) +ppmtompeg: $(ADDL_OBJECTS) $(LIBOPT) +ppmtompeg: LDFLAGS_TARGET = \ + $(shell $(LIBOPT) $(LIBOPTR) $(JPEGLIBX)) $(NETWORKLD) +profile: $(ADDL_OBJECTS) $(LIBOPT) +profile: LDFLAGS_TARGET = \ + -Bstatic -pg \ + $(shell $(LIBOPT) $(LIBOPTR) $(JPEGLIBX)) $(NETWORKLD) ######### # OTHER # diff --git a/doc/HISTORY b/doc/HISTORY index e1af31f8..71dfd6a6 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -9,6 +9,9 @@ not yet BJH Release 10.67.00 pamsharpness: put primary output on Standard Output instead of on Standard Error as a Netpbm message. + Windows build: include an icon in every executable. The icon + was designed by Ron Vantreese (eaglesunxp@aol.com). + Build: Fix inconsistent use of upper and lower case Y and N in make variables, causing static library not to get built. Introduced in 10.66. diff --git a/editor/pamflip/Makefile b/editor/pamflip/Makefile index 83e961a7..1173fe2b 100644 --- a/editor/pamflip/Makefile +++ b/editor/pamflip/Makefile @@ -13,13 +13,15 @@ SUBDIRS = MERGEBINARIES = pamflip -BINARIES = pamflip +PORTBINARIES = pamflip + +BINARIES = $(PORTBINARIES) SCRIPTS = -PAMFLIP_OBJECTS = pamflip.o pamflip_sse.o +ADDL_OBJECTS = pamflip_sse.o -OBJECTS = $(PAMFLIP_OBJECTS) +OBJECTS = pamflip.o $(ADDL_OBJECTS) MERGE_OBJECTS = $(OBJECTS:%.o=%.o2) @@ -30,7 +32,4 @@ all: $(BINARIES) $(SUBDIRS:%=%/all) pamflip_sse.o pamflip_sse.o2: CFLAGS_TARGET = $(CFLAGS_SSE) -pamflip: $(PAMFLIP_OBJECTS) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $(PAMFLIP_OBJECTS) \ - $(shell $(LIBOPT) $(NETPBMLIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD) +pamflip:%:%.o $(ADDL_OBJECTS) diff --git a/icon/Makefile b/icon/Makefile new file mode 100644 index 00000000..0bd33bf4 --- /dev/null +++ b/icon/Makefile @@ -0,0 +1,24 @@ +ifeq ($(SRCDIR)x,x) + SRCDIR = $(CURDIR)/.. + BUILDDIR = $(SRCDIR) +endif +SUBDIR = buildtools +VPATH = .:$(SRCDIR)/$(SUBDIR) +include $(BUILDDIR)/config.mk + +all: netpbm.ico + +include $(SRCDIR)/common.mk + +%.ico:%.ppm + ppmtowinicon $< >$@ + +%.o:%.ico + echo "id ICON \"$<\"" >rc + windres --input-format rc --input rc --output-format coff --output $@ + rm rc + +distclean clean: cleanlocal +.PHONY: cleanlocal +cleanlocal: + rm -f rc diff --git a/icon/netpbm.ico b/icon/netpbm.ico new file mode 100644 index 00000000..3bb8e29f --- /dev/null +++ b/icon/netpbm.ico Binary files differdiff --git a/icon/netpbm.ppm b/icon/netpbm.ppm new file mode 100644 index 00000000..eb5e9d71 --- /dev/null +++ b/icon/netpbm.ppm @@ -0,0 +1,12 @@ +P6 +48 48 +255 +****'''' PPoooooPP<7YYhwwhhYHPoo>tbdvD~whH'*PVvhh$wh'*o"^vpp$h7*o^z̢̒|\h7oVz̢ҸҸx\hPo0n̢Ҹx4wH o V{\h'*0n x4wHoBn xY +Y oZ`XXaaaLLxY +h'*o Zhl`ؖX|ii4Y + +h'*o b`lhȠؖؖ|ild` + + +w'*olb`Ƞؖd`\ +w'*ohlX̹d\h'PhhX̰ҜLih'Pg>j̰ҰҐtLii4Y*d(jҐt,Ԝhw7odRztTԜh4h*odd(p̌؞Ԯt,ԜȨ|4wHP`Lp̌؞Ԯ̼tPȨTwY *P`Lv̌Plwh'*P|lڸڰRvtTlzlh'*TlttИЦFj~ttLrVl/q4tt|̇|*lVTn,z~~r^6q/Rq4DTXddXXD!&BBddddXJ6R/R!!!R/qq//Rq//qq//Rqqq//qqq//qqR//qqqqq/RqqqqqR//RqqqqqqRR////// \ No newline at end of file diff --git a/other/Makefile b/other/Makefile index 69562be0..33c52a00 100644 --- a/other/Makefile +++ b/other/Makefile @@ -28,12 +28,12 @@ PORTBINARIES = pamarith pambayer pamchannel pamdepth \ pamstack pamsummcol pamvalidate pnmcolormap \ ppmdcfont ppmddumpfont ppmdmkfont -BINARIES = $(PORTBINARIES) - ifneq ($(LINUXSVGALIB),NONE) - BINARIES += ppmsvgalib + PORTBINARIES += ppmsvgalib endif +BINARIES = $(PORTBINARIES) + SCRIPTS = ppmtomap pamfixtrunc OBJECTS = $(BINARIES:%=%.o) @@ -50,10 +50,7 @@ all: $(BINARIES) $(SUBDIRS:%=%/all) include $(SRCDIR)/common.mk -ppmsvgalib: %: %.o $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $< \ - $(shell $(LIBOPT) $(NETPBMLIB) $(LINUXSVGALIB)) \ - $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(LADD) +ppmsvgalib: LDFLAGS_TARGET = $(LINUXSVGALIB) install.bin: install.bin.local .PHONY: install.bin.local diff --git a/other/pamx/Makefile b/other/pamx/Makefile index b41cadf8..4e06e0fd 100644 --- a/other/pamx/Makefile +++ b/other/pamx/Makefile @@ -25,23 +25,20 @@ else endif ifeq ($(HAVE_X11LIB),Y) - BINARIES += pamx + PORTBINARIES += pamx - PAMX_OBJECTS = \ - pamx.o \ - image.o \ - send.o \ - window.o \ - - MERGE_OBJECTS = \ - pamx.o2 \ + EXTRA_OBJECTS = \ image.o \ send.o \ window.o \ endif -OBJECTS = $(PAMX_OBJECTS) +BINARIES = $(PORTBINARIES) + +OBJECTS = $(BINARIES:%=%.o) $(EXTRA_OBJECTS) + +MERGE_OBJECTS = $(BINARIES:%=%.o2) $(EXTRA_OBJECTS) MERGEBINARIES = $(BINARIES) @@ -55,7 +52,6 @@ else X11_LIBOPTS = $(shell pkg-config x11 --libs) endif -pamx: $(PAMX_OBJECTS) $(NETPBMLIB) $(LIBOPT) - $(LD) -o $@ $(PAMX_OBJECTS) \ - $(shell $(LIBOPT) $(NETPBMLIB) $(X11_LIBOPTS)) \ - $(LDFLAGS) $(LDLIBS) $(MATHLIB) $(RPATH) $(LADD) +pamx: image.o send.o window.o +pamx: ADDL_OBJECTS = image.o send.o window.o +pamx: LDFLAGS_TARGET = $(X11_LIBOPTS) |