From 3dc016ffcacd2be22f9bb03589d0114e86e413cd Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 13 Sep 2017 15:21:29 +0200 Subject: [PATCH] consolidate makefiles a bit --- makefile | 6 ------ makefile.shared | 5 ----- makefile_include.mk | 6 ++++++ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/makefile b/makefile index 0df3d8b..d602da4 100644 --- a/makefile +++ b/makefile @@ -64,12 +64,6 @@ install: .common_install uninstall: .common_uninstall -.PHONY: mtest -mtest: $(LIBNAME) - cd mtest; CC="$(CC)" CFLAGS="$(CFLAGS) -I../" MAKE=${MAKE} ${MAKE} mtest - -demo/test.o: CFLAGS+=-Wno-unused-result - .PHONY: test test: $(LIBNAME) demo/test.o $(CC) $(CFLAGS) demo/test.o $(LIBNAME) $(PROF) -o test diff --git a/makefile.shared b/makefile.shared index 8caa95a..117071c 100644 --- a/makefile.shared +++ b/makefile.shared @@ -67,11 +67,6 @@ install: .common_install uninstall: .common_uninstall rm $(DESTDIR)$(LIBPATH)/pkgconfig/tomsfastmath.pc -mtest/mtest: mtest/mtest.c - cd mtest ; make mtest - -demo/test.o: CFLAGS+=-Wno-unused-result - .PHONY: test test: $(LIBNAME) demo/test.o $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o test demo/test.o $(LIBNAME) diff --git a/makefile_include.mk b/makefile_include.mk index a1c5d5c..b92468c 100644 --- a/makefile_include.mk +++ b/makefile_include.mk @@ -82,6 +82,12 @@ INCPATH ?= $(PREFIX)/include default: $(LIBNAME) +demo/test.o: CFLAGS+=-Wno-unused-result + +.PHONY: mtest +mtest: $(LIBNAME) + CC="$(CC)" CFLAGS="$(CFLAGS) -I../" MAKE=${MAKE} ${MAKE} -C mtest/ mtest + .common_install: $(LIBNAME) install -d $(DESTDIR)$(LIBPATH) $(INSTALL_CMD) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)