summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 078b0a0..0eea24b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,11 @@
CC = gcc
-CFLAGS = -Wall -Wextra -std=c11 -fwrapv
+CFLAGS = -Wall -Wextra -std=c11 -fwrapv -fPIC
ifneq ($(DEBUG),)
CFLAGS += -g
else
CFLAGS += -O2
endif
+LDFLAGS = -ldl
BIN = cserver
PLUGINDIR = plugins
@@ -24,7 +25,7 @@ remake: clean all
$(BIN): $(patsubst %.c,%.o,$(wildcard *.c))
- $(CC) -o $@ $^
+ $(CC) -o $@ $^ $(LDFLAGS)
%.o: %.c $(wildcard $(dir %.o)*.h)
$(CC) $(CFLAGS) -c -o $@ $<