consolidate makefiles a bit

This commit is contained in:
Steffen Jaeckel 2017-09-13 15:21:29 +02:00
parent 8924d33424
commit 3dc016ffca
3 changed files with 6 additions and 11 deletions

View File

@ -64,12 +64,6 @@ install: .common_install
uninstall: .common_uninstall 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 .PHONY: test
test: $(LIBNAME) demo/test.o test: $(LIBNAME) demo/test.o
$(CC) $(CFLAGS) demo/test.o $(LIBNAME) $(PROF) -o test $(CC) $(CFLAGS) demo/test.o $(LIBNAME) $(PROF) -o test

View File

@ -67,11 +67,6 @@ install: .common_install
uninstall: .common_uninstall uninstall: .common_uninstall
rm $(DESTDIR)$(LIBPATH)/pkgconfig/tomsfastmath.pc rm $(DESTDIR)$(LIBPATH)/pkgconfig/tomsfastmath.pc
mtest/mtest: mtest/mtest.c
cd mtest ; make mtest
demo/test.o: CFLAGS+=-Wno-unused-result
.PHONY: test .PHONY: test
test: $(LIBNAME) demo/test.o test: $(LIBNAME) demo/test.o
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o test demo/test.o $(LIBNAME) $(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o test demo/test.o $(LIBNAME)

View File

@ -82,6 +82,12 @@ INCPATH ?= $(PREFIX)/include
default: $(LIBNAME) 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) .common_install: $(LIBNAME)
install -d $(DESTDIR)$(LIBPATH) install -d $(DESTDIR)$(LIBPATH)
$(INSTALL_CMD) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) $(INSTALL_CMD) $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)