about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-06-24 02:09:05 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-06-24 02:09:05 +0000
commit9ca9a06e4d814bd43e5184b4b7b08cffc4b13e77 (patch)
treec879402f5ce87376e0933e14ce1a7bc62d5a45d7
parentce19d8c7904507c3638550c41ca20f6d721e2ff7 (diff)
downloadnetpbm-mirror-9ca9a06e4d814bd43e5184b4b7b08cffc4b13e77.tar.gz
netpbm-mirror-9ca9a06e4d814bd43e5184b4b7b08cffc4b13e77.tar.xz
netpbm-mirror-9ca9a06e4d814bd43e5184b4b7b08cffc4b13e77.zip
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
-rw-r--r--buildtools/Makefile6
-rw-r--r--common.mk2
-rw-r--r--config.mk.in4
-rw-r--r--icon/Makefile3
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