From 9ca9a06e4d814bd43e5184b4b7b08cffc4b13e77 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 24 Jun 2015 02:09:05 +0000 Subject: Various cross-compile fixes, especially for MinGW target git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2562 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- buildtools/Makefile | 6 +++--- common.mk | 2 +- config.mk.in | 4 ++++ icon/Makefile | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/buildtools/Makefile b/buildtools/Makefile index 6a2e33da..8671c066 100644 --- a/buildtools/Makefile +++ b/buildtools/Makefile @@ -8,9 +8,9 @@ include $(BUILDDIR)/config.mk MERGE_OBJECTS = -PROGS = libopt typegen endiangen +BUILDPROGS = libopt typegen endiangen -all: $(PROGS) +all: $(BUILDPROGS) OMIT_BUILDTOOL_RULE = 1 include $(SRCDIR)/common.mk @@ -39,4 +39,4 @@ $(BUILDPROGS):%:%.o distclean clean: cleanlocal .PHONY: cleanlocal cleanlocal: - rm -f $(PROGS) + rm -f $(BUILDPROGS) diff --git a/common.mk b/common.mk index 60c7e2c8..a5431727 100644 --- a/common.mk +++ b/common.mk @@ -389,7 +389,7 @@ LDFLAGS_ALL = $(WINICON_OBJECT) \ $(PORTBINARIES) $(MATHBINARIES): %: %.o \ $(NETPBMLIB) $(LIBOPT) $(WINICON_OBJECT) - $(LD) -o $@ $@.o $(ADDL_OBJECTS) $(LDFLAGS_ALL) + $(LD) -o $@$(EXE) $@.o $(ADDL_OBJECTS) $(LDFLAGS_ALL) # MERGE STUFF diff --git a/config.mk.in b/config.mk.in index a59006e7..0f2ccb6c 100644 --- a/config.mk.in +++ b/config.mk.in @@ -110,6 +110,10 @@ LD_FOR_BUILD = $(LD) CFLAGS_FOR_BUILD = $(CFLAGS_CONFIG) LDFLAGS_FOR_BUILD = $(LDFLAGS) +# WINDRES is the program that creates a linkable object file from +# a Windows Icon (.ico) file. +WINDRES = windres + # MAKE is set automatically by Make to what was used to invoke Make. INSTALL = $(SRCDIR)/buildtools/install.sh diff --git a/icon/Makefile b/icon/Makefile index 0bd33bf4..2181c88b 100644 --- a/icon/Makefile +++ b/icon/Makefile @@ -15,7 +15,8 @@ include $(SRCDIR)/common.mk %.o:%.ico echo "id ICON \"$<\"" >rc - windres --input-format rc --input rc --output-format coff --output $@ + $(WINDRES) --input-format rc --input rc --output-format coff \ + --output $@ rm rc distclean clean: cleanlocal -- cgit 1.4.1