From c3856f9f1db26ab379dae9e750dc7b8b42705255 Mon Sep 17 00:00:00 2001 From: epochqwert Date: Mon, 14 Nov 2016 18:00:49 +0000 Subject: made the Makefile a bit more sane. --- Makefile | 16 +++++++++++----- README | 2 ++ README.md | 2 -- 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 README delete mode 100644 README.md 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 b/README new file mode 100644 index 0000000..ba0967b --- /dev/null +++ b/README @@ -0,0 +1,2 @@ +C implementation of hashtables. +Uses linked lists in each node to manage hash collisions. diff --git a/README.md b/README.md deleted file mode 100644 index ba0967b..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -C implementation of hashtables. -Uses linked lists in each node to manage hash collisions. -- cgit v1.2.3