Commit 4f6517fb authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Small changes for separate source/object tree compilation.

parent 872ccc60
......@@ -18,7 +18,7 @@ DESTDIR=
capture: capture.c
cc $(CFLAGS) -o capture capture.c
cc $(CFLAGS) -o capture $<
# Do not install by default.
......@@ -12,11 +12,11 @@ include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS = -O2 -g
LIBS = -lz
imagezip: imagezip.c
$(CC) $(CFLAGS) imagezip.c $(LIBS) -o imagezip
imagezip: imagezip.o
$(CC) $(CFLAGS) imagezip.o $(LIBS) -o imagezip
imageunzip: imageunzip.c
$(CC) $(CFLAGS) imageunzip.c $(LIBS) -o imageunzip
imageunzip: imageunzip.o
$(CC) $(CFLAGS) imageunzip.o $(LIBS) -o imageunzip
install: $(INSTALL_BINDIR)/imagezip $(INSTALL_BINDIR)/imageunzip
......@@ -20,29 +20,31 @@ DBFLAG = -DUSE_MYSQL_DB
DBSRC = bootinfo_null.c bootinfo_cfile.c bootinfo_mysql.c
DBOBJ = bootinfo_null.o bootinfo_cfile.o bootinfo_mysql.o
INCS = -I/usr/local/include
INCS += -I/n/moab/z/mike/flux/install.debug/include
#INCS += -I/n/moab/z/stoller/oskit-debug/install/include
#INCS += -I/build/oskit-debug/install/include
INCS = -I/n/moab/z/mike/flux/install.debug/include
#INCS = -I/n/moab/z/stoller/oskit-debug/install/include
#INCS = -I/build/oskit-debug/install/include
proxydhcp: proxydhcp.c
cc $(CFLAGS) -o proxydhcp proxydhcp.c $(LFLAGS)
proxydhcp: proxydhcp.o
cc $(CFLAGS) -o proxydhcp proxydhcp.o $(LFLAGS)
bootinfo: bootinfo.c $(DBSRC) bootinfo_mysql.c
cc $(CFLAGS) $(DBFLAG) $(INCS) -I/usr/local/include \
-o bootinfo bootinfo.c $(DBSRC) \
bootinfo: bootinfo.o $(DBOBJ)
cc $(CFLAGS) $(DBFLAG) $(INCS) \
-o bootinfo bootinfo.o $(DBOBJ) \
$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient
testmysql: bootinfo_mysql.c
cc $(CFLAGS) -DUSE_MYSQL_DB -DTEST $(INCS) -I/usr/local/include \
-o testmysql bootinfo_mysql.c \
-o testmysql $< \
$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient
testcfile: bootinfo_cfile.c
cc $(CFLAGS) -DUSE_CFILE_DB -DTEST $(INCS) -o testcfile \
bootinfo_cfile.c $(LFLAGS)
cc $(CFLAGS) -DUSE_CFILE_DB -DTEST $(INCS) -o testcfile $< $(LFLAGS)
install: all
......@@ -54,4 +56,4 @@ install: $(INSTALL_SBINDIR)/proxydhcp \
rm -f proxydhcp bootinfo testmysql
rm -f *.o core proxydhcp bootinfo testmysql
......@@ -24,8 +24,10 @@ CFLAGS = -O -g \
-DDOC_ROOT='"$(prefix)/libexec/"' \
suexec: suexec.c suexec.h
$(CC) $(CFLAGS) -o suexec suexec.c
suexec: suexec.o
$(CC) $(CFLAGS) -o suexec suexec.o
suexec.o: suexec.c suexec.h
install: $(addprefix $(INSTALL_LIBEXECDIR)/, $(BINS)) \
$(addprefix $(INSTALL_SBINDIR)/, paperbag)
......@@ -12,16 +12,17 @@ all: tmcd tmcc
include $(TESTBED_SRCDIR)/GNUmakerules
tmcd: tmcd.c
$(CC) $(CFLAGS) -DTBDBNAME='"$(TBDBNAME)"' -g -o tmcd tmcd.c \
-I/usr/local/include \
CFLAGS += -DTBDBNAME='"$(TBDBNAME)"' -I/usr/local/include
tmcd: tmcd.o
$(CC) $(CFLAGS) -o tmcd tmcd.o \
$(LFLAGS) -L/usr/local/lib/mysql -lmysqlclient
tmcc: tmcc.c
$(CC) $(CFLAGS) -g -o tmcc tmcc.c $(LFLAGS)
tmcc: tmcc.o
$(CC) $(CFLAGS) -g -o tmcc tmcc.o $(LFLAGS)
tmcc.c: decls.h
tmcd.c: decls.h
tmcc.o: tmcc.c decls.h
tmcd.o: tmcd.c decls.h
install: all
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment