aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2020-05-15 02:51:19 -0500
committerepoch <epoch@hacking.allowed.org>2020-05-15 02:51:19 -0500
commit611150ef5965e4b1ea4e571e96a59dda623ee74c (patch)
treed1544f770905f053e94d45560958335b7df51acd
parentdc0e82958e2d6a47cd9c85d06d4e3d6282a71a7d (diff)
downloadlibhashtable-611150ef5965e4b1ea4e571e96a59dda623ee74c.tar.gz
libhashtable-611150ef5965e4b1ea4e571e96a59dda623ee74c.zip
moved some CFLAGS to target-specific
-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)