From c7d6d370edab9867ee373576820e631f32996e55 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 11 Sep 2006 18:33:37 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc_samples/; revision=11138 --- checkin_notes | 10 ++++++++++ sleeper/Makefile | 16 ++++++++++------ uppercase/Makefile | 18 +++++++++++------- worker/worker.C | 3 +++ wrapper/Makefile | 15 +++++++++------ 5 files changed, 43 insertions(+), 19 deletions(-) diff --git a/checkin_notes b/checkin_notes index 4ac823ee63..a7803ce23e 100644 --- a/checkin_notes +++ b/checkin_notes @@ -164,3 +164,13 @@ David 9 Sept 2006 wrapper/ wrapper.C + +David 11 Sept 2006 + - added library dependencies to makefiles + + uppercase/Makefile + sleeper/Makefile + worker/ + Makefile + worker.C + wrapper/Makefile diff --git a/sleeper/Makefile b/sleeper/Makefile index 314041672d..5d0837b4a1 100644 --- a/sleeper/Makefile +++ b/sleeper/Makefile @@ -5,12 +5,16 @@ # This creates a symbolic link to the C++ library, # which is linked statically +BOINC_DIR = ../../boinc +BOINC_API_DIR = $(BOINC_DIR)/api +BOINC_LIB_DIR = $(BOINC_DIR)/lib + CXXFLAGS = -g \ - -I ../../boinc \ - -I ../../boinc/lib \ - -I ../../boinc/api \ - -L ../../boinc/api \ - -L ../../boinc/lib \ + -I$(BOINC_DIR) \ + -I$(BOINC_LIB_DIR) \ + -I$(BOINC_API_DIR) \ + -L$(BOINC_API_DIR) \ + -L$(BOINC_LIB_DIR) \ -L. PROGS = sleeper @@ -20,5 +24,5 @@ all: $(PROGS) clean: rm $(PROGS) -sleeper: sleeper.o +sleeper: sleeper.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a g++ $(CXXFLAGS) -o sleeper sleeper.o libstdc++.a -pthread -lboinc_api -lboinc diff --git a/uppercase/Makefile b/uppercase/Makefile index eaacbc467d..983a1e5871 100644 --- a/uppercase/Makefile +++ b/uppercase/Makefile @@ -5,12 +5,16 @@ # This creates a symbolic link to the C++ library, # which is linked statically +BOINC_DIR = ../../boinc +BOINC_API_DIR = $(BOINC_DIR)/api +BOINC_LIB_DIR = $(BOINC_DIR)/lib + CXXFLAGS = -g \ - -I ../../boinc \ - -I ../../boinc/lib \ - -I ../../boinc/api \ - -L ../../boinc/api \ - -L ../../boinc/lib \ + -I$(BOINC_DIR) \ + -I$(BOINC_LIB_DIR) \ + -I$(BOINC_API_DIR) \ + -L$(BOINC_API_DIR) \ + -L$(BOINC_LIB_DIR) \ -L /usr/X11R6/lib \ -L. @@ -29,10 +33,10 @@ clean: # the -Wl,--export-dynamic causes the main program's symbols # to be exported to the graphics library -upper_case: upper_case.o +upper_case: upper_case.o $(BOINC_API_DIR)/libboinc_api.a $(BOINC_API_DIR)/libboinc_graphics_lib.a $(BOINC_LIB_DIR)/libboinc.a g++ $(CXXFLAGS) -Wl,--export-dynamic -o upper_case upper_case.o libstdc++.a -pthread -lboinc_api -lboinc -lboinc_graphics_lib -ldl -upper_case.so: uc_graphics.o +upper_case.so: uc_graphics.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics_impl.a g++ $(CXXFLAGS) -o upper_case.so \ -shared -fPIC -pthread \ uc_graphics.o \ diff --git a/worker/worker.C b/worker/worker.C index dbc4c7c647..8653861b00 100644 --- a/worker/worker.C +++ b/worker/worker.C @@ -19,9 +19,12 @@ // worker - application without BOINC runtime system; // used for testing wrapper +// +// THIS PROGRAM SHOULDN'T USE ANY BOINC CODE. That's the whole point. #include #include + #include "util.h" int main(int, char**) { diff --git a/wrapper/Makefile b/wrapper/Makefile index d4f4c57b53..ae069ca34c 100644 --- a/wrapper/Makefile +++ b/wrapper/Makefile @@ -5,12 +5,15 @@ # This creates a symbolic link to the C++ library, # which is linked statically +BOINC_DIR = ../../boinc +BOINC_API_DIR = $(BOINC_DIR)/api +BOINC_LIB_DIR = $(BOINC_DIR)/lib CXXFLAGS = -g \ - -I../../boinc \ - -I../../boinc/lib \ - -I../../boinc/api \ - -L../../boinc/api \ - -L../../boinc/lib \ + -I$(BOINC_DIR) \ + -I$(BOINC_LIB_DIR) \ + -I$(BOINC_API_DIR) \ + -L$(BOINC_API_DIR) \ + -L$(BOINC_LIB_DIR) \ -L. PROGS = wrapper @@ -20,5 +23,5 @@ all: $(PROGS) clean: rm $(PROGS) -wrapper: wrapper.o +wrapper: wrapper.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a g++ $(CXXFLAGS) -o wrapper wrapper.o libstdc++.a -pthread -lboinc_api -lboinc