GNUmakefile.in 696 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
12

13
include $(TESTBED_SRCDIR)/GNUmakerules
14

15 16 17 18
CFLAGS	+= -DTBDBNAME='"$(TBDBNAME)"' -I/usr/local/include

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

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

24 25
tmcc.o:	tmcc.c decls.h
tmcd.o:	tmcd.c decls.h
26 27 28

install:	all

29 30
install:	$(INSTALL_SBINDIR)/tmcd \
		$(INSTALL_SBINDIR)/tmcd.restart
31 32 33 34 35 36 37

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

clean: 
38
	rm -f *.o core tmcd tmcc