X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=Makefile;h=05039089b279b3f3e13f93cdb099be6202045188;hb=5e5f1cd9c4bf4d5c06a8a1bdb168e8ddda9a2593;hp=fb4a778a878cdbde84c1658baa0fa622c507ddd9;hpb=551ef6ebd6cfbf7caf60dd132953fad4b687f107;p=my-code%2Fhdw-sniff.git diff --git a/Makefile b/Makefile index fb4a778..0503908 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,28 @@ -#!/usr/bin/make +# Makefile of hdw-sniff -CC = gcc -CFLAGS = -O3 -LDFLAGS = -lpcap +INCLUDEDIR = /usr/include -TARGETS = hdw-sniff +CFLAGS = -DDEBUG -O3 -Wall +LIBS = -lpcap -all: $(TARGETS) +API_OBJS = network.o event.o input.o display.o audio.o -hdw-sniff: - $(CC) $(CFLAGS) -Wall list.c hdw-sniff.c $(LDFLAGS) -o hdw-sniff -# $(CC) $(CFLAGS) -Wall hdw-sniff.c $(LDFLAGS) -o hdw-sniff +api: links $(API_OBJS) +hdw-sniff: $(API_OBJS) + $(CC) $(CFLAGS) -o $@ $(API_OBJS) hdw-sniff.c $(LIBS) +all: hdw-sniff + +clean: + rm -f $(API_OBJS) {event,input,display,audio,network,list}.{c,h} + rm -f hdw-sniff + +links: + ln -sf ../api/event/event.{c,h} . + ln -sf ../api/input/input.{c,h} . + ln -sf ../api/display/display.{c,h} . + ln -sf ../api/audio/audio.{c,h} . + ln -sf ../api/network/network.{c,h} . + ln -sf ../api/list/list.{c,h} . + +remake: clean all