GNUmakefile.in 927 Bytes
Newer Older
1 2 3 4 5
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= event/example

6
SYSTEM	       := $(shell uname -s)
7
PROGRAMS	= tbrecv tbsend tbrecv.py tbsend.py eventdebug.pl
8 9 10 11 12 13 14 15

include $(OBJDIR)/Makeconf

all:	$(PROGRAMS)

include $(TESTBED_SRCDIR)/GNUmakerules

CFLAGS   += -DDEBUG
16
CFLAGS	 += -O -g -static -Wall
17
CFLAGS   += -I. -I${OBJDIR} -I$(SRCDIR)/../lib -I$(TESTBED_SRCDIR)/lib/libtb
18
CFLAGS   += `elvin-config --cflags vin4c`
19

20
LDFLAGS  += -static -L../lib -L${OBJDIR}/lib/libtb
21
LIBS     += -levent -ltb -lcrypto
22
LIBS     += `elvin-config --libs vin4c`
23 24 25
ifeq ($(SYSTEM),Linux)
LIBS     += -ldl
endif
26

27 28 29 30 31
tbrecv:		tbrecv.o
	$(CC) $(LDFLAGS) -o $@ tbrecv.o $(LIBS)

tbsend:		tbsend.o
	$(CC) $(LDFLAGS) -o $@ tbsend.o $(LIBS)
32 33 34

$(PROGRAMS):	../lib/libevent.a ../lib/event.h

35
install:	$(addprefix $(INSTALL_SBINDIR)/, eventdebug.pl)
36

37 38 39 40
# not a client thing
client:
client-install: client

41 42
clean:
	/bin/rm -f *.o $(PROGRAMS)