new
|-- Makefile
|-- dns
| |-- README
| |-- checkDNS.c
| |-- checkDNS.h
| |-- dns.h
| |-- genDNSPacket.c
| |-- genDNSPacket.h
| |-- readDNS.c
| ` -- readDNS.h
|-- http
| |-- checkHttp.c
| |-- checkHttp.h
| |-- genHttpPacket.c
| |-- genHttpPacket.h
| |-- http.h
| |-- readHttp.c
| ` -- readHttp.h
|-- rc
` -- share
|-- constVar.h
|-- file.h
|-- net.c
|-- net.h
|-- servConnect.c
|-- servConnect.h
` -- socketHead.h
makefile文件:(不包含dns的)
all: netM
CC = gcc
INCLUDE = . / http
INCLUDE += - I . / share
OBJS = net.o readHttp.o genHttpPacket.o servConnect.o checkHttp.o
vpath % .h . / http : . / share
vpath % .c . / http : . / share
vpath % .o . / : . / http : . / share
netM: $(OBJS)
$(CC) - o netM $(OBJS)
readHttp.o: readHttp.c readHttp.h constVar.h file.h
$(CC) - c $ < - I$(INCLUDE)
genHttpPacket.o: genHttpPacket.c genHttpPacket.h constVar.h http.h
socketHead.h
$(CC) - c $ < - I$(INCLUDE)
servConnect.o: servConnect.c servConnect.h constVar.h http.h socketHead.h
$(CC) - c $ < - I$(INCLUDE)
checkHttp.o: checkHttp.c checkHttp.h constVar.h http.h socketHead.h
genHttpPacket.h servConnect.h
$(CC) - c $ < - I$(INCLUDE)
net.o: net.c net.h constVar.h readHttp.h file.h servConnect.h http.h
socketHead.h checkHttp.h genHttpPacket.h
$(CC) - c $ < - I$(INCLUDE)
.PHONY: clean
clean:
- rm $(OBJS)