summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 89e9937..25fb69d 100644
--- a/Makefile
+++ b/Makefile
@@ -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)