summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-10-04 09:52:15 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-10-04 09:52:15 +0000
commit135537af3501d8676c7b6ad1bee2f8a51f7b0ca2 (patch)
treea36e1ae3876ed3827d69bd0795140cd31c480718 /Makefile
parent217fe99bdeff910bfedb375f970db0f5a9b4cc93 (diff)
downloadsegfault-135537af3501d8676c7b6ad1bee2f8a51f7b0ca2.tar.gz
segfault-135537af3501d8676c7b6ad1bee2f8a51f7b0ca2.zip
added example dlopen-able libhack.c and updated Makefile to actually be able to build segfault. was missing -ldl
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 56eb231..4e755c7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,15 @@
-LDFLAGS=-L/usr/local/lib -L/home/pi/.local/lib -lirc -lhashtable -lgcc_s -lidc
-CFLAGS=-pedantic -Wall -ggdb -I/usr/local/include -I/home/pi/.local/include
+PREFIX:=/usr/local
+LDFLAGS=-L/usr/local/lib -L$(PREFIX)/lib -lirc -lhashtable -lgcc_s -lidc -ldl
+CFLAGS=-pedantic -Wall -ggdb -I/usr/local/include -I$(PREFIX)/include
-all: segfault
+all: segfault libhack.so
+
+libhack.so: libhack.o
+ ld -shared -o libhack.so libhack.o
again: clean all
-segfault: segfault.c
+segfault: segfault.c access.h
clean:
rm -f segfault