All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

GNUmakefile.in 2.18 KB
Newer Older
1
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2 3 4
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
5
#
Leigh B. Stoller's avatar
Leigh B. Stoller committed
6

7 8 9 10
SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ..
SUBDIR		= pxe
11

12
include $(OBJDIR)/Makeconf
13

14 15 16 17 18
#
# 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
19

20
include $(TESTBED_SRCDIR)/GNUmakerules
Leigh B. Stoller's avatar
Leigh B. Stoller committed
21

22 23 24
DBFLAG	= -DUSE_MYSQL_DB
#DBFLAG = -DUSE_CFILE_DB
#DBFLAG = -DUSE_NULL_DB
25 26 27 28
BI_DBSRC   = bootinfo_null.c bootinfo_cfile.c bootinfo_mysql.c
BI_DBOBJ   = bootinfo_null.o bootinfo_cfile.o bootinfo_mysql.o
PR_DBSRC   = proxydhcp_cfile.c proxydhcp_mysql.c 
PR_DBOBJ   = proxydhcp_cfile.o proxydhcp_mysql.o 
29

30
INCS    = -I/usr/local/include
31

32 33 34 35 36
#ifeq "$(filter -DLBS, $(CFLAGS))" "-DLBS"
#INCS   += -I/build/oskit-debug/install/include
#else
#INCS   += -I/n/moab/z/mike/flux/install.debug/include
#endif
37 38

CFLAGS	+= $(INCS) $(DBFLAG) -DSOLARIS -DHAVE_SOCKADDR_SA_LEN -DUSE_RECVMSG \
39 40
		-DCONFPATH='"$(INSTALL_ETCDIR)/"' -DTBDBNAME='"$(TBDBNAME)"' \
		-DFALLBACK_HOST='"$(BOSSNODE)"'
Leigh B. Stoller's avatar
Leigh B. Stoller committed
41

42 43 44 45
proxydhcp: proxydhcp.o $(PR_DBOBJ)
	cc $(CFLAGS) $(DBFLAG) $(INCS) \
		-o proxydhcp proxydhcp.o $(PR_DBOBJ) \
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient
Leigh B. Stoller's avatar
Leigh B. Stoller committed
46

47
bootinfo: bootinfo.o $(BI_DBOBJ)
48
	cc $(CFLAGS) $(DBFLAG) $(INCS) \
49 50 51 52 53 54
		-o bootinfo bootinfo.o $(BI_DBOBJ) \
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

testbootinfo_mysql: bootinfo_mysql.c
	cc $(CFLAGS) -DUSE_MYSQL_DB -DTEST $(INCS) \
		-o testmysql $< \
55 56
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

57 58 59 60
testbootinfo_cfile: bootinfo_cfile.c
	cc $(CFLAGS) -DUSE_CFILE_DB -DTEST $(INCS) -o testcfile $< $(LFLAGS)

testproxydhcp_mysql: proxydhcp_mysql.c
61 62
	cc $(CFLAGS) -DUSE_MYSQL_DB -DTEST $(INCS) \
		-o testmysql $< \
63 64
		$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient

65
testproxydhcp_cfile: proxydhcp_cfile.c
66
	cc $(CFLAGS) -DUSE_CFILE_DB -DTEST $(INCS) -o testcfile $< $(LFLAGS)
Leigh B. Stoller's avatar
Leigh B. Stoller committed
67 68

install:	all
69

70 71 72 73 74 75
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
76 77

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