summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 0c32d75..8fc398a 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,10 @@ all: build/libstrvec.so build/libstrvec.a build/test
clean:
rm -rf build
+cleanall: clean
+ make -C lib/liballoc cleanall
+ make -C lib/libdvec cleanall
+
build:
mkdir build
@@ -34,8 +38,9 @@ lib/liballoc/build/liballoc.a:
lib/libdvec/build/libdvec.a:
make -C lib/libdvec build/libdvec.a
-build/libstrvec.a: src/strvec.c include/strvec.h libstrvec.api | build
- $(CC) -o build/tmp.o src/strvec.c $(CFLAGS) -r
+build/libstrvec.a: src/strvec.c lib/libdvec/build/libdvec.a \
+ include/strvec.h libstrvec.api | build
+ $(CC) -o build/tmp.o src/strvec.c lib/libdvec/build/libdvec.a $(CFLAGS) -r
objcopy --keep-global-symbols=libstrvec.api build/tmp.o build/fixed.o
ar rcs $@ build/fixed.o
@@ -44,7 +49,7 @@ build/libstrvec.so: src/strvec.c include/strvec.h libstrvec.lds | build
-shared -Wl,-version-script libstrvec.lds
build/test: src/test.c build/libstrvec.a lib/liballoc/build/liballoc.a
- $(CC) -o $@ $^ $(CFLAGS)
+ $(CC) -o $@ $^ -g -I include -I lib/libdvec/include -I lib/liballoc/include
install:
install -m644 include/strvec.h -t "$(DESTDIR)$(PREFIX)$(INCLDIR)"
@@ -56,4 +61,4 @@ uninstall:
rm -f "$(DESTDIR)$(PREFIX)$(LIBDIR)/libstrvec.so"
rm -f "$(DESTDIR)$(PREFIX)$(LIBDIR)/libstrvec.a"
-.PHONY: all clean install uninstall
+.PHONY: all clean cleanall install uninstall