Description: Allow overriding various make variables, for cross-building
Author: Colin Watson <cjwatson@debian.org>
Forwarded: yes
Last-Update: 2012-04-01

Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -5,17 +5,18 @@
 CFLAGS:=-g3 -O2 -Wall -Werror
 LFLAGS:=
 CC:=gcc
+PKG_CONFIG:=pkg-config
 
-CFLAGS += $(shell pkg-config --cflags libxml-2.0)
-LFLAGS += -lpopt $(shell pkg-config --libs libxml-2.0)
+LIBXML_CFLAGS := $(shell $(PKG_CONFIG) --cflags libxml-2.0)
+LIBXML_LFLAGS := $(shell $(PKG_CONFIG) --libs libxml-2.0)
 
 all : dumpet
 
 dumpet : dumpet.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
+	$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) -lpopt $(LIBXML_LFLAGS)
 
 dumpet.o : dumpet.c dumpet.h iso9660.h eltorito.h endian.h
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) $(LIBXML_CFLAGS) -c -o $@ $<
 
 clean : 
 	@rm -vf *.o dumpet
