summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--README (renamed from README.md)0
2 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index d448fa2..89e9937 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,22 @@
-LDFLAGS=-lhashtable -Llibhashtable
+### why the fuck is this here? LDFLAGS=-lhashtable -Llibhashtable
CFLAGS=-fpic -shared -pedantic -Wall
+PREFIX=/usr/local
TARGET=libhashtable.so
all: $(TARGET)
-$(TARGET): libhashtable.c
+libhashtable.h:
./genheader.sh
- $(CC) $(CFLAGS) -o $(TARGET) libhashtable.c
+
+$(TARGET): libhashtable.c libhashtable.h
clean:
rm -f libhashtable.so
install:
- cp $(TARGET) /usr/local/lib/$(TARGET)
- cp hashtable.h /usr/local/include/hashtable.h
+ cp $(TARGET) $(PREFIX)/lib/$(TARGET)
+ cp hashtable.h $(PREFIX)/include/hashtable.h
+
+uninstall:
+ rm $(PREFIX)/lib/$(TARGET)
+ rm $(PREFIX)/include/hashtable.h
diff --git a/README.md b/README
index ba0967b..ba0967b 100644
--- a/README.md
+++ b/README