Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 0.45 KB | None | 0 0
  1. C_FILES := $(wildcard *.c)
  2. OBJ_FILES := $(addprefix obj/,$(notdir $(C_FILES:.c=.o)))
  3. LD_FLAGS  := -lm
  4. C_FLAGS := -Wall -MMD -g
  5. #CPP_FLAGS := -Wall -MMD -g -fstack-protector-strong -fno-omit-frame-pointer -std=c++11
  6.  
  7. LD_FLAGS += $(shell pkg-config --libs openssl)
  8. LD_FLAGS += $(shell pkg-config --libs libnetfilter_queue)
  9.  
  10. main: $(OBJ_FILES)
  11.     gcc -o $@ $^ $(LD_FLAGS)
  12.  
  13. obj/%.o: %.c Makefile
  14.     gcc $(C_FLAGS) -c -o $@ $<
  15.  
  16. -include $(OBJFILES:.o=.d)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement