pcap.u.mak

最終更新:2010/1/10

pcap.u.mak

001: #
002: # Makefile for APR / libpcap Samples
003: #
004: # はじめに Shift_JIS のソースコードを ORG の下に保管しておく。
005: # Usage:
006: # make -f pcap.u.mak
007: #
008: 
009: TARGETS=ktcpdump
010: 
011: APR_CONFIG=$(shell which apr-1-config)
012: APU_CONFIG=$(shell which apu-1-config)
013: 
014: CC=gcc
015: ICONV=iconv
016: 
017: CFLAGS=$(shell ${APR_CONFIG} --cflags --cppflags --includes) -Wall
018: LDFLAGS=$(shell ${APR_CONFIG} --ldflags)
019: LDLIBS=$(shell ${APR_CONFIG} --libs --link-ld) $(shell ${APU_CONFIG} --libs --link-ld) -lpcap
020: 
021: default:	buildall
022: 
023: buildall:	$(TARGETS)
024: 
025: clean:
026: 	$(RM) *.o *.c *.h *~ $(TARGETS)
027: 
028: mystab.h:	ORG/mystab.h
029: 	$(ICONV) -f Shift_JIS -t EUC-JP $< > $@
030: 
031: mystab.c:	ORG/mystab.c
032: 	$(ICONV) -f Shift_JIS -t EUC-JP $< > $@
033: 
034: mystab.o:	mystab.h
035: 
036: mystab_pcap.h:	ORG/mystab_pcap.h
037: 	$(ICONV) -f Shift_JIS -t EUC-JP $< > $@
038: 
039: mystab_pcap.c:	ORG/mystab_pcap.c
040: 	$(ICONV) -f Shift_JIS -t EUC-JP $< > $@
041: 
042: mystab_pcap.o:	mystab_pcap.h mystab.h
043: 
044: ktcpdump.c:	ORG/ktcpdump.c
045: 	$(ICONV) -f Shift_JIS -t EUC-JP $< > $@
046: 
047: ktcpdump.o:	mystab_pcap.h mystab.h
048: 
049: ktcpdump:	ktcpdump.o mystab_pcap.o mystab.o
050: 	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
Copyright (C) KAKU PROJECT (2009)KAKU PROJECT (2009)