aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 25fb69d..9b86af1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
### why the fuck is this here? LDFLAGS=-lhashtable -Llibhashtable
-CFLAGS=-fpic -shared -pedantic -Wall -g3
+CFLAGS=-pedantic -Wall -g3
PREFIX:=/usr/local
TARGET=libhashtable.so
@@ -8,6 +8,7 @@ all: $(TARGET)
libhashtable.h:
./genheader.sh
+$(TARGET): CFLAGS+=-fpic -shared
$(TARGET): libhashtable.o
ld -shared -o $(TARGET) libhashtable.o
@@ -15,7 +16,7 @@ clean:
rm -f libhashtable.so
rm *.o
-install:
+install: all
mkdir -p $(PREFIX)/lib
mkdir -p $(PREFIX)/include
install $(TARGET) $(PREFIX)/lib/$(TARGET)