GNUmakefile.in 1.59 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
DBSRC	= bootinfo_null.c bootinfo_cfile.c bootinfo_mysql.c
23
DBOBJ   = bootinfo_null.o bootinfo_cfile.o bootinfo_mysql.o
24

25
INCS    = -I/usr/local/include
26 27 28 29

ifeq "$(filter -DLBS, $(CFLAGS))" "-DLBS"
INCS   += -I/build/oskit-debug/install/include
else
30
INCS   += -I/n/moab/z/mike/flux/install.debug/include
31
endif
32 33

CFLAGS	+= $(INCS) $(DBFLAG) -DSOLARIS -DHAVE_SOCKADDR_SA_LEN -DUSE_RECVMSG \
34
		-DCONFPATH='"$(INSTALL_ETCDIR)/"' -DTBDBNAME='"$(TBDBNAME)"'
Leigh B. Stoller's avatar
Leigh B. Stoller committed
35

36 37
proxydhcp: proxydhcp.o
	cc $(CFLAGS) -o proxydhcp proxydhcp.o $(LFLAGS)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
38

39 40 41
bootinfo: bootinfo.o $(DBOBJ)
	cc $(CFLAGS) $(DBFLAG) $(INCS) \
		-o bootinfo bootinfo.o $(DBOBJ) \
42 43 44
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

testmysql: bootinfo_mysql.c
45 46
	cc $(CFLAGS) -DUSE_MYSQL_DB -DTEST $(INCS) \
		-o testmysql $< \
47 48 49
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

testcfile: bootinfo_cfile.c
50
	cc $(CFLAGS) -DUSE_CFILE_DB -DTEST $(INCS) -o testcfile $< $(LFLAGS)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
51 52

install:	all
53

54 55 56 57 58 59
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
60 61

clean: 
62
	rm -f *.o core proxydhcp bootinfo testmysql