summaryrefslogtreecommitdiff
path: root/examples/simple_talker
diff options
context:
space:
mode:
authorJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-11-20 15:23:03 +0100
committerJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-11-21 10:20:19 +0100
commite161e739f32c4856279bf0eb9aae70af9ce69ae3 (patch)
tree0ee8129d128135c21bf63816a477204e2920b40e /examples/simple_talker
parenta0d00b25b635fe257633ad9e5b8d7dc8cf64519f (diff)
downloadOpen-AVB-e161e739f32c4856279bf0eb9aae70af9ce69ae3.tar.gz
Examples makefiles: harmonization and cleaning.
Remove some unneeded linker flags, add some missing headers dependencies, same optimization and debug options for all.
Diffstat (limited to 'examples/simple_talker')
-rw-r--r--examples/simple_talker/Makefile16
1 files changed, 7 insertions, 9 deletions
diff --git a/examples/simple_talker/Makefile b/examples/simple_talker/Makefile
index 5acf04d7..ac5b458e 100644
--- a/examples/simple_talker/Makefile
+++ b/examples/simple_talker/Makefile
@@ -1,9 +1,8 @@
-OPT=-O2
-CFLAGS=$(OPT) -Wall -Wextra -Wno-parentheses
-
CC=gcc
+OPT=-O2 -g
+CFLAGS=$(OPT) -Wall -Wextra -Wno-parentheses
INCFLAGS=-I../../lib/igb -I../../daemons/mrpd -I../common
-LDLIBS=-ligb -lpci -lz -lrt -lm -pthread
+LDLIBS=-ligb -lpci -lrt -lm -pthread
LDFLAGS=-L../../lib/igb
all: simple_talker
@@ -11,15 +10,14 @@ all: simple_talker
simple_talker: simple_talker.o ../common/talker_mrp_client.o
simple_talker.o: simple_talker.c
- gcc -c $(INCFLAGS) $(CFLAGS) simple_talker.c
+ $(CC) $(CFLAGS) $(INCFLAGS) -c simple_talker.c
-../common/talker_mrp_client.o:
+../common/talker_mrp_client.o: ../common/talker_mrp_client.c ../common/talker_mrp_client.h
make -C ../common/ talker_mrp_client.o
%: %.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
clean:
- rm -f `find . -name "*~" -o -name "*.[oa]" -o -name "\#*\#" -o -name TAGS -o -name core -o -name "*.orig"` simple_talker
- rm -f ../common/talker_mrp_client.o
-
+ $(RM) simple_talker
+ $(RM) `find . -name "*~" -o -name "*.[oa]" -o -name "\#*\#" -o -name TAGS -o -name core -o -name "*.orig"`