简单的Makefile写法
CC = gcc CFLAGS = -g -Wall LIBS = -lpthread -lnetfilter_queue -lmnl INCLUDES= -I../../libnetfilter_queue-1.0.2/include/ main:nfqnl_test.o test.o gcc -o $@ $^ $(LIBS) nfqnl_test.o: nfqnl_test.c cc $(CFLAGS) $(LIBS) $(INCLUDES) -c $< test.o: test.c cc $(CFLAGS) $(LIBS) $(INCLUDES) -c $< clean: -rm *.o main
联系方式:heshengjun@tinywsn.com