From 5a1e97c349b81a32ae0bb6a3dd2b4877a9d14027 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 4 Oct 2008 18:51:38 +0000 Subject: [PATCH] - Unix build system: build samples/example_app/, and change the samples/ makefiles so that they automatically create the symbolic link to libstdc++.a Fixes #725 svn path=/trunk/boinc/; revision=16129 --- Makefile.am | 2 +- checkin_notes | 9 +++++++++ samples/example_app/Makefile | 12 +++++------- samples/example_app/Makefile.debian | 12 +++++------- samples/multi_thread/Makefile | 10 ++++------ samples/sleeper/Makefile | 10 ++++------ samples/wrapper/Makefile | 10 ++++------ 7 files changed, 32 insertions(+), 33 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6fb5d7baaa..bf2c97dda9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,7 @@ ACLOCAL_AMFLAGS = -I m4 API_SUBDIRS = api lib zip if ENABLE_SERVER - SERVER_SUBDIRS = db test py sched apps tools + SERVER_SUBDIRS = db test py sched apps tools samples/example_app endif if ENABLE_CLIENT diff --git a/checkin_notes b/checkin_notes index 312d4cb2ad..d0397b12cd 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8034,3 +8034,12 @@ David 4 Oct 2008 client/ client_state.cpp cs_trickle.cpp + +David 4 Oct 2008 + - Unix build system: build samples/example_app/, + and change the samples/ makefiles so that they automatically + create the symbolic link to libstdc++.a + Fixes #725 + + Makefile.am + samples/*/Makefile diff --git a/samples/example_app/Makefile b/samples/example_app/Makefile index 8d2c1eade7..fd1feaf0fb 100644 --- a/samples/example_app/Makefile +++ b/samples/example_app/Makefile @@ -1,10 +1,5 @@ # This should work on Linux. Modify as needed for other platforms. -# Do this first: -# ln -s `g++ -print-file-name=libstdc++.a` -# This creates a symbolic link to the C++ library, -# which is linked statically - BOINC_DIR = ../.. BOINC_API_DIR = $(BOINC_DIR)/api BOINC_LIB_DIR = $(BOINC_DIR)/lib @@ -29,13 +24,16 @@ PROGS = uc2 uc2_graphics all: $(PROGS) +libstdc++.a: + ln -s `g++ -print-file-name=libstdc++.a` + clean: /bin/rm -f $(PROGS) -uc2: uc2.o $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a +uc2: uc2.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a $(CXX) $(CXXFLAGS) -o uc2 uc2.o libstdc++.a -pthread -lboinc_api -lboinc -uc2_graphics: uc2_graphics.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a +uc2_graphics: libstdc++.a uc2_graphics.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a $(CXX) $(CXXFLAGS) -o uc2_graphics uc2_graphics.o libstdc++.a -pthread \ -lboinc_graphics2 -lboinc_api -lboinc \ $(LIBGLUT) $(LIBGLU) $(LIBJPEG) \ diff --git a/samples/example_app/Makefile.debian b/samples/example_app/Makefile.debian index f76b785924..41151fa9bd 100644 --- a/samples/example_app/Makefile.debian +++ b/samples/example_app/Makefile.debian @@ -1,10 +1,5 @@ # This should work on Linux. Modify as needed for other platforms. -# Do this first: -# ln -s `g++ -print-file-name=libstdc++.a` -# This creates a symbolic link to the C++ library, -# which is linked statically - BOINC_DIR = ../.. BOINC_API_DIR = $(BOINC_DIR)/api BOINC_LIB_DIR = $(BOINC_DIR)/lib @@ -29,13 +24,16 @@ PROGS = uc2 uc2_graphics all: $(PROGS) +libstdc++.a: + ln -s `g++ -print-file-name=libstdc++.a` + clean: /bin/rm -f $(PROGS) -uc2: uc2.o $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a +uc2: uc2.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a $(CXX) $(CXXFLAGS) -o uc2 uc2.o libstdc++.a -pthread -lboinc_api -lboinc -uc2_graphics: uc2_graphics.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a +uc2_graphics: uc2_graphics.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a $(CXX) $(CXXFLAGS) -o uc2_graphics uc2_graphics.o libstdc++.a -pthread \ -lboinc_graphics2 -lboinc_api -lboinc \ $(LIBGLUT) $(LIBGLU) $(LIBJPEG) \ diff --git a/samples/multi_thread/Makefile b/samples/multi_thread/Makefile index a077490a11..6bac2cdbeb 100644 --- a/samples/multi_thread/Makefile +++ b/samples/multi_thread/Makefile @@ -1,10 +1,5 @@ # This should work on Linux. Modify as needed for other platforms. -# Do this first: -# ln -s `g++ -print-file-name=libstdc++.a` -# This creates a symbolic link to the C++ library, -# which is linked statically - BOINC_DIR = ../.. BOINC_API_DIR = $(BOINC_DIR)/api BOINC_LIB_DIR = $(BOINC_DIR)/lib @@ -21,8 +16,11 @@ PROGS = multi_thread all: $(PROGS) +libstdc++.a: + ln -s `g++ -print-file-name=libstdc++.a` + clean: /bin/rm -f $(PROGS) -multi_thread: multi_thread.o $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a +multi_thread: multi_thread.o libstdc++.a $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a $(CXX) $(CXXFLAGS) -o multi_thread multi_thread.o libstdc++.a -pthread -lboinc_api -lboinc diff --git a/samples/sleeper/Makefile b/samples/sleeper/Makefile index 79662b5927..a4ad8a5448 100644 --- a/samples/sleeper/Makefile +++ b/samples/sleeper/Makefile @@ -1,10 +1,5 @@ # This should work on Linux. Modify as needed for other platforms. -# Do this first: -# ln -s `g++ -print-file-name=libstdc++.a` -# This creates a symbolic link to the C++ library, -# which is linked statically - BOINC_DIR = ../.. BOINC_API_DIR = $(BOINC_DIR)/api BOINC_LIB_DIR = $(BOINC_DIR)/lib @@ -21,8 +16,11 @@ PROGS = sleeper all: $(PROGS) +libstdc++.a: + ln -s `g++ -print-file-name=libstdc++.a` + clean: rm $(PROGS) -sleeper: sleeper.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a +sleeper: sleeper.o libstdc++.a $(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/samples/wrapper/Makefile b/samples/wrapper/Makefile index 0b7fbc745f..8547d4fdc7 100644 --- a/samples/wrapper/Makefile +++ b/samples/wrapper/Makefile @@ -1,10 +1,5 @@ # This should work on Linux. Modify as needed for other platforms. -# Do this first: -# ln -s `g++ -print-file-name=libstdc++.a` -# This creates a symbolic link to the C++ library, -# which is linked statically - # Change the following to match your installation BOINC_DIR = ../.. BOINC_API_DIR = $(BOINC_DIR)/api @@ -22,8 +17,11 @@ PROGS = wrapper all: $(PROGS) +libstdc++.a: + ln -s `g++ -print-file-name=libstdc++.a` + clean: rm $(PROGS) *.o -wrapper: wrapper.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a +wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a g++ $(CXXFLAGS) -o wrapper wrapper.o libstdc++.a -pthread -lboinc_api -lboinc