makefile

来自「IPv4和IPv6下发任意包的程序」· 代码 · 共 23 行

TXT
23
字号
DEFINES = `sh /usr/bin/libnet-config --defines`
LIBS = `sh /usr/bin/libnet-config --libs`
LIBNET_PATH = /usr/lib/libnet.a
CC = gcc

snot: snot_main.o snot_parse_rules.o snot_send_packets.o
	$(CC) -g $(DEFINES) $(LIBS) -o snot snot_main.c snot_parse_rules.o snot_send_packets.o $(LIBNET_PATH) $(LIBS)

snot_parse_rules.o: snot_parse_rules.c snot_main.o
	$(CC) -g $(DEFINES) -c -o snot_parse_rules.o snot_parse_rules.c

snot_send_packets.o: snot_send_packets.c snot_main.o
	$(CC) -g $(DEFINES) -c -o snot_send_packets.o snot_send_packets.c

snot_main.o: snot_main.c
	$(CC) -g $(DEFINES) -c -o snot_main.o snot_main.c

clean:
	rm *.o snot

unixify:
	sh tr.sh

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?