Fix: examples Makefile on FreeBSD
[urcu.git] / doc / examples / qsbr-minimal / Makefile
index 53f1380f1289cafe4528ef83d25cb24ec09725f9..b0400cb594f6de350cd17808be27f54bb3e8b522 100644 (file)
@@ -8,35 +8,23 @@
 # Permission to modify the code and to distribute modified code is
 # granted, provided the above notices are retained, and a notice that
 # the code was modified is included with the above copyright notice.
+#
+# This makefile is purposefully kept simple to support GNU and BSD make.
 
 CC = gcc
 LIBS = -lurcu-qsbr
 CFLAGS = -g -O2 -Wall
-
-# Only necessary when building from the source tree and userspace RCU is
-# not installed
-ifdef BUILD_EXAMPLES_FROM_TREE
-LOCAL_CPPFLAGS += -I../../../urcu/ -I../../../
-LIBURCU_QSBR_PATH = ../../../.libs/
-override LDFLAGS += -L$(LIBURCU_QSBR_PATH) -Wl,-rpath='$$ORIGIN/$(LIBURCU_QSBR_PATH)'
-
-# Third-party Makefiles have to define these targets to integrate with an
-# automake project
-EMPTY_AUTOMAKE_TARGETS = distdir install install-data install-exec uninstall \
-       install-dvi install-html install-info install-ps install-pdf \
-       installdirs check installcheck mostlyclean distclean maintainer-clean \
-       dvi pdf ps info tags ctags
-.PHONY: $(EMPTY_AUTOMAKE_TARGETS)
-$(EMPTY_AUTOMAKE_TARGETS):
-endif
+OBJECTS = qsbr-minimal.o
 
 all: qsbr-minimal
 
-qsbr-minimal: qsbr-minimal.o
-       $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
+qsbr-minimal: $(OBJECTS)
+       $(CC) $(CFLAGS) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
+               $(LIBS) -o $@ $(OBJECTS)
 
 qsbr-minimal.o: qsbr-minimal.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) \
+               -c -o $@ $<
 
 .PHONY: clean
 clean:
This page took 0.023241 seconds and 4 git commands to generate.