Makefile.bsd4
上传用户:bobuwen
上传日期:2007-01-07
资源大小:10k
文件大小:1k
- # BSD4.4 Makefile will probably work on most OSs
- # this attempts to get around the ip_len bug, if your OS is known
- # to have fixed that (OpenBSD 2.1), then remove the IP_LEN_HORDER define
- # Set your compiler here
- CC = gcc
- # Definitions specific to BSD4.4 derived systems
- # This gets around a bug in the ip_len field of the IP packet
- # if ipicmp doesnt work (results in an error), you'll need this.
- # OpenBSD 2.1 has fixed this problem, so on OpenBSD comment this.
- DEFINES = -DIP_LEN_HORDER
- # Tweak these if you have to
- INCLUDE_DIR = -I.
- CFLAGS = -Wall -g -c
- LINK = $(CC) -o
- COMPILE = $(CC) $(INCLUDE_DIR) $(DEFINES) $(CFLAGS)
- TARGETS = tcp udp ipicmp
- # The rest should work.
- all: $(TARGETS)
- tcp: tcp.o in_cksum.o tcp_gen.o ip_gen.o trans_check.o
- $(LINK) tcp tcp.o in_cksum.o tcp_gen.o ip_gen.o trans_check.o
- udp: udp.o in_cksum.o udp_gen.o ip_gen.o trans_check.o
- $(LINK) udp udp.o in_cksum.o udp_gen.o ip_gen.o trans_check.o
- ipicmp: ipicmp.o in_cksum.o
- $(LINK) ipicmp ipicmp.o in_cksum.o
- .c.o:
- $(COMPILE) $<
- clean:
- rm -rf *.o $(TARGETS)