From df4f3e0bbac23acc824c6511fb3def71ca4b657b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 24 May 2020 00:54:13 -0700 Subject: [PATCH] Add example Makefile for building validators and assimilators --- sched/Makefile.example | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sched/Makefile.example diff --git a/sched/Makefile.example b/sched/Makefile.example new file mode 100644 index 0000000000..37dffdf5b2 --- /dev/null +++ b/sched/Makefile.example @@ -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