Add example Makefile for building validators and assimilators

This commit is contained in:
David Anderson 2020-05-24 00:54:13 -07:00
parent 33be97e1f4
commit df4f3e0bba
1 changed files with 38 additions and 0 deletions

38
sched/Makefile.example Normal file
View File

@ -0,0 +1,38 @@
# Example Makefile for building BOINC server programs
# like validators and assimilators
#
# This can go wherever you want; it doesn't have to be in the BOINC tree.
# Edit to change the program names and whatever else is needed.
#
# This assumes your BOINC tree is in ~/boinc,
# and that you did configure/make there.
all: sample_bitwise_validator sample_dummy_assimilator
CFLAGS = -g -Wall
BOINC = ~/boinc
LIBS = $(BOINC)/sched/libsched.a $(BOINC)/lib/libboinc.a \
-lmariadb
INC = -I $(BOINC) -I $(BOINC)/lib -I $(BOINC)/sched -I $(BOINC)/db \
-I /usr/include/mariadb
CXX = g++ $(CFLAGS) $(INC)
VALIDATOR_OBJS = $(BOINC)/sched/validator.o \
$(BOINC)/sched/validate_util.o \
$(BOINC)/sched/validate_util2.o
ASSIMILATOR_OBJS = $(BOINC)/sched/assimilator.o \
$(BOINC)/sched/validate_util.o
.cpp.o:
$(CXX) -c -o $*.o $<
sample_bitwise_validator: sample_bitwise_validator.cpp
$(CXX) sample_bitwise_validator.cpp $(VALIDATOR_OBJS) $(LIBS) -o sample_bitwise_validator
sample_dummy_assimilator: sample_dummy_assimilator.cpp
$(CXX) sample_dummy_assimilator.cpp $(ASSIMILATOR_OBJS) $(LIBS) -o sample_dummy_assimilator