53 lines
1.2 KiB
Makefile
53 lines
1.2 KiB
Makefile
# Makefile
|
|
#
|
|
#
|
|
CC = gcc
|
|
DEPS = ipx.h ipxstack.h
|
|
|
|
# Flags for C compiler
|
|
# -g adds debugging information to the executable file
|
|
# -Wall turns on most, but not all, compiler warnings
|
|
CFLAGS = -ggdb -Wall
|
|
LDFLAGS= -lxnet
|
|
|
|
all: ipxstack client-socket client-stream client-spx
|
|
|
|
ipxstack: ipxstack.o configini.o
|
|
$(CC) ipxstack.o configini.o $(LDFLAGS) -o ipxstack -lpcap
|
|
|
|
configini.o: ../libconfigini/src/configini.c ../libconfigini/src/configini.h ../libconfigini/src/queue.h
|
|
$(CC) -c ../libconfigini/src/configini.c $(LDFLAGS) -o configini.o
|
|
|
|
ipxstack.o: ipxstack.c $(DEPS)
|
|
$(CC) -c ipxstack.c $(CFLAGS) -o ipxstack.o
|
|
|
|
client-spx: client-spx.o
|
|
$(CC) client-spx.o $(LDFLAGS) -o client-spx
|
|
|
|
client-spx.o: client-spx.c
|
|
$(CC) -c client-spx.c $(CFLAGS) -o client-spx.o
|
|
|
|
client-socket: client-socket.o
|
|
$(CC) client-socket.o $(LDFLAGS) -o client-socket
|
|
|
|
client-stream: client-stream.o
|
|
$(CC) client-stream.o $(LDFLAGS) -o client-stream
|
|
|
|
client-socket.o: client-socket.c $(DEPS)
|
|
$(CC) -c client-socket.c $(CFLAGS) -o client-socket.o
|
|
|
|
client-stream.o: client-stream.c $(DEPS)
|
|
$(CC) -c client-stream.c $(CFLAGS) -o client-stream.o
|
|
|
|
clean:
|
|
$(RM) ipxstack
|
|
$(RM) client-stream
|
|
$(RM) client-socket
|
|
$(RM) client-spx
|
|
$(RM) *.o
|
|
$(RM) socket*
|
|
pkill ipxstack
|
|
$(RM) core
|
|
|
|
|