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

9
include $(OBJDIR)/Makeconf
10

11 12 13 14 15
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
all: proxydhcp bootinfo proxydhcp.restart bootinfo.restart
16

17
include $(TESTBED_SRCDIR)/GNUmakerules
Leigh B. Stoller's avatar
Leigh B. Stoller committed
18

19 20 21
DBFLAG	= -DUSE_MYSQL_DB
#DBFLAG = -DUSE_CFILE_DB
#DBFLAG = -DUSE_NULL_DB
22 23
DBSRC	= bootinfo_null.c bootinfo_cfile.c bootinfo_mysql.c

24 25
CFLAGS	= -g -DSOLARIS -DHAVE_SOCKADDR_SA_LEN -DUSE_RECVMSG \
		-DCONFPATH='"$(INSTALL_ETCDIR)/"' -DTBDBNAME='"$(TBDBNAME)"'
26
INCS	= -I/n/moab/z/mike/flux/install.debug/include
27
#INCS	= -I/n/moab/z/stoller/oskit-debug/install/include
28
#INCS	= -I/build/oskit-debug/install/include
Leigh B. Stoller's avatar
Leigh B. Stoller committed
29 30 31 32

proxydhcp: proxydhcp.c
	cc $(CFLAGS) -o proxydhcp proxydhcp.c $(LFLAGS)

33 34 35
bootinfo: bootinfo.c $(DBSRC) bootinfo_mysql.c
	cc $(CFLAGS) $(DBFLAG) $(INCS) -I/usr/local/include \
		-o bootinfo bootinfo.c $(DBSRC) \
36 37 38
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

testmysql: bootinfo_mysql.c
39 40 41 42 43
	cc $(CFLAGS) -DUSE_MYSQL_DB -DTEST $(INCS) -I/usr/local/include \
		-o testmysql bootinfo_mysql.c \
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

testcfile: bootinfo_cfile.c
44 45
	cc $(CFLAGS) -DUSE_CFILE_DB -DTEST $(INCS) -o testcfile \
		bootinfo_cfile.c $(LFLAGS)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
46 47

install:	all
48

49 50 51 52 53 54
install:	$(INSTALL_SBINDIR)/proxydhcp \
		$(INSTALL_SBINDIR)/proxydhcp.restart \
		$(INSTALL_SBINDIR)/bootinfo \
		$(INSTALL_SBINDIR)/bootinfo.restart \
		$(INSTALL_ETCDIR)/proxydhcp.conf \
		$(INSTALL_ETCDIR)/bootinfo.conf
Leigh B. Stoller's avatar
Leigh B. Stoller committed
55 56

clean: 
57
	rm -f proxydhcp bootinfo testmysql