GNUmakefile.in 790 Bytes
Newer Older
1 2 3
#
# Insert Copyright Here.
#
4 5 6 7
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= tmcd
8

9
include $(OBJDIR)/Makeconf
10

11
all:	tmcd tmcc tmcd.restart findif
12

13
include $(TESTBED_SRCDIR)/GNUmakerules
14

15
CFLAGS	+= -O -g -DUDP -I${OBJDIR} -I/usr/local/include
16 17 18

tmcd: tmcd.o
	$(CC) $(CFLAGS) -o tmcd tmcd.o \
19 20
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

21
tmcc: tmcc.o
22 23 24 25
	$(CC) $(CFLAGS) -g -o tmcc tmcc.o $(LFLAGS) -static

findif: findif.o
	$(CC) $(CFLAGS) -g -o findif findif.o $(LFLAGS) -static
26

27 28
tmcc.o:	tmcc.c decls.h
tmcd.o:	tmcd.c decls.h
29 30 31

install:	all

32 33
install:	$(INSTALL_SBINDIR)/tmcd \
		$(INSTALL_SBINDIR)/tmcd.restart
34 35 36 37 38 39 40

$(INSTALL_BINDIR)/tmcd/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_BINDIR)/tmcd
	$(INSTALL_PROGRAM) $< $@

clean: 
41
	rm -f *.o core tmcd tmcc findif