From 5880dc8fe137bfaa8cb0aff5e73ef32b28bf7a5e Mon Sep 17 00:00:00 2001 From: xiphmont Date: Sat, 13 Jan 2007 08:54:07 +0000 Subject: [PATCH] First attempt at simple examples makefile git-svn-id: http://svn.xiph.org/trunk/fusd@12313 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- examples/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/Makefile diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..6329f35 --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,24 @@ +SRC = console-read.c drums3.c echo.c helloworld.c logring.c pager.c\ + drums2.c drums.c ioctl.c uid-filter.c +OBJ = console-read.o drums3.o echo.o helloworld.o logring.o pager.o\ + drums2.o drums.o ioctl.o uid-filter.o +TARGETS = console-read drums3 echo helloworld logring pager\ + drums2 drums ioctl uid-filter + +default: $(TARGETS) + +install: $(TARGETS) + +clean: + rm -f *.o *.d $(TARGETS) gmon.out *~ + +$(TARGETS): %.o: %.c + $(CC) '-g -O2 $(SCF) $(GCF)' $< -o $@ libfusd.so.0.0 $(SLF) + +%.d: %.c + $(CC) -M $(CFLAGS) $< > $@.$$$$; sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; rm -f $@.$$$$ + +ifeq ($(MAKECMDGOALS),target) +include $(SRC:.c=.d) +endif +