Saturday, March 29, 2008

TCL PCAP (tcap ) lib makefile for mac

$ cat Makefile
all: tcap.so

tcap.so: tcap.c pcaputil.c
gcc -O2 -Wall -pedantic -g -c -I/usr/local/include/tcl8.3/
tcap.c
gcc -O2 -Wall -g -c pcaputil.c
gcc -dynamiclib -g tcap.o pcaputil.o -lpcap -ltcl -o tcap.so

install: tcap.so
mkdir -p /System/Library/Tcl/tcap
cp pkgIndex.tcl /System/Library/Tcl/tcap/pkgIndex.tcl
cp tcap.so /System/Library/Tcl/tcap/tcap.so

clean:
rm -f *.core *.o *.so
$


© yankandpaste®

No comments: