Commit 0ad53dee authored by Joanne Hugé's avatar Joanne Hugé

Change link flags order to fix linking error

parent 61296eff
......@@ -25,20 +25,21 @@ CFLAGS += -MD -MP
CFLAGS += -I $(SRCDIR)
CFLAGS += -std=gnu99
LDFLAGS = -pthread
LLIBS = -pthread
ifneq ($(WITH_XDP),)
CFLAGS += -D WITH_XDP -I${HOME}/libbpf/include
LDFLAGS += -L${HOME}/libbpf/src -l:libbpf.a
LDIRS += -L${HOME}/libbpf/src
LLIBS += -l:libbpf.a
endif
vpath %.c $(SRCDIR)
$(SERVER_PROG): $(SERVER_OBJS)
$(CC) $(LDFLAGS) $^ -o $@
$(CC) $(LDFLAGS) $(LDIRS) $^ $(LLIBS) -o $@
$(CLIENT_PROG): $(CLIENT_OBJS)
$(CC) $(LDFLAGS) $^ -o $@
$(CC) $(LDFLAGS) $(LDIRS) $^ $(LLIBS) -o $@
-include $(subst .c,.d,$(SERVER_SRCS))
-include $(subst .c,.d,$(CLIENT_SRCS))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment