diff options
author | epochqwert <epoch@hacking.allowed.org> | 2019-03-12 17:27:16 +0000 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2019-03-12 17:27:16 +0000 |
commit | 68cdf93f9ed722c08e63771e875721d3b0165509 (patch) | |
tree | b160d80a7a1fa4be3b1baf071870afea991c0e25 /Makefile | |
parent | c3856f9f1db26ab379dae9e750dc7b8b42705255 (diff) | |
download | libhashtable-68cdf93f9ed722c08e63771e875721d3b0165509.tar.gz libhashtable-68cdf93f9ed722c08e63771e875721d3b0165509.zip |
changed cp to install, optional override of PREFIX, use LD insted of expecting make to know how to build a shared lib.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1,6 +1,6 @@ ### why the fuck is this here? LDFLAGS=-lhashtable -Llibhashtable -CFLAGS=-fpic -shared -pedantic -Wall -PREFIX=/usr/local +CFLAGS=-fpic -shared -pedantic -Wall -g3 +PREFIX:=/usr/local TARGET=libhashtable.so all: $(TARGET) @@ -8,14 +8,18 @@ all: $(TARGET) libhashtable.h: ./genheader.sh -$(TARGET): libhashtable.c libhashtable.h +$(TARGET): libhashtable.o + ld -shared -o $(TARGET) libhashtable.o clean: rm -f libhashtable.so + rm *.o install: - cp $(TARGET) $(PREFIX)/lib/$(TARGET) - cp hashtable.h $(PREFIX)/include/hashtable.h + mkdir -p $(PREFIX)/lib + mkdir -p $(PREFIX)/include + install $(TARGET) $(PREFIX)/lib/$(TARGET) + install hashtable.h $(PREFIX)/include/hashtable.h uninstall: rm $(PREFIX)/lib/$(TARGET) |