Fix: Don't override user variables within the build system
[urcu.git] / doc / examples / Makefile.examples.template
index 6dd2baca623174da315f8b9d2a5b4064e302323a..4b2378ea7b01e9d5d13baa0d156961255360d7f4 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-CC = $(AM_CC)
-endif
-CFLAGS = -g -O2 -Wall
+LOCAL_CFLAGS := -g -O2 -Wall
 
 all: $(BINARY)
 
 $(BINARY): $(OBJECTS)
 
 all: $(BINARY)
 
 $(BINARY): $(OBJECTS)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
+       $(CC) $(LOCAL_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
                -o $@ $(OBJECTS) $(LIBS)
 
 $(OBJECTS): $(SOURCES) $(DEPS)
                -o $@ $(OBJECTS) $(LIBS)
 
 $(OBJECTS): $(SOURCES) $(DEPS)
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) \
+       $(CC) $(LOCAL_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) \
                -c -o $@ $(SOURCES)
 
 .PHONY: clean
                -c -o $@ $(SOURCES)
 
 .PHONY: clean
This page took 0.023011 seconds and 4 git commands to generate.