Makefile.linux
上传用户:bobuwen
上传日期:2007-01-07
资源大小:10k
文件大小:1k
- # Makefile for Linux (tested on 2.0.29)
- # Thamer Al-Herbish shadows@whitefang.com
- #
- # Set your compiler here
- CC = gcc
- # Set for Linux, and use the IP_LEN_HORDER bug work around
- # if it fails they might of fixed the bug, and you wont need the IP_LEN_HORDER
- # definition.
- DEFINES = -DLINUX -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)