RM=rm -f
CC=gcc $(CCOPT)
OSTYPE=Darwin
CPUTYPE=i386
HVOPT=-DHV

CFLAGS=-D$(OSTYPE) -D$(CPUTYPE) $(HVOPT) -Wall
LDFLAGS=-lpthread
OBJS=vpcs.o \
	daemon.o \
	readline.o \
	packets.o \
	utils.o \
	queue.o \
	command.o \
	dev.o \
	dhcp.o \
	command6.o \
	packets6.o \
	ip.o \
	tcp.o \
	inet6.o \
	dns.o \
	remote.o \
	help.o \
	dump.o \
	relay.o \
	hv.o \
	frag.o \
	frag6.o

all: vpcs

vpcs: $(OBJS)
	$(CC) $(OBJS) -o vpcs $(LDFLAGS) 

debug: vpcs

.c.o: keys.h vpcs.h packets.h dhcp.h
	$(CC) $(INCLUDE_PATH) $(CFLAGS) $(OPT) -c $<

clean:
	$(RM) *.o vpcs
