From ebcbbb657e830b1573c4a3eebe4473dfd28ce9d4 Mon Sep 17 00:00:00 2001 From: Reinhard Prix Date: Sat, 15 Mar 2008 03:26:14 +0000 Subject: [PATCH] fixed internal library dependencies in Makefile.am's svn path=/trunk/boinc/; revision=14918 --- Makefile.incl | 17 ++++++--------- api/Makefile.am | 4 ++-- apps/Makefile.am | 3 ++- checkin_notes | 17 +++++++++++++++ client/Makefile.am | 2 +- clientgui/Makefile.am | 2 +- sched/Makefile.am | 50 ++++++------------------------------------- tools/Makefile.am | 16 +++----------- 8 files changed, 38 insertions(+), 73 deletions(-) diff --git a/Makefile.incl b/Makefile.incl index 3c635dd85f..c1ab71265f 100644 --- a/Makefile.incl +++ b/Makefile.incl @@ -9,8 +9,6 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RSA_LIBS = -lcrypto -SCHED_LIB = -L$(top_builddir)/sched -lsched -BOINC_LIB = -L$(top_builddir)/lib -lboinc AM_CPPFLAGS = \ -I$(top_srcdir)/lib \ @@ -19,22 +17,19 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/client \ -I$(top_srcdir)/tools \ -I$(top_srcdir)/sched \ - -I$(top_srcdir)/lib/mac \ - $(MYSQL_CFLAGS) \ - $(PTHREAD_CFLAGS) - -AM_CFLAGS = $(AM_CPPFLAGS) -AM_CXXFLAGS = $(AM_CPPFLAGS) -AM_LDFLAGS = -L../lib + -I$(top_srcdir)/lib/mac # dependencies to make sure libs gets compiled before # programs linking to them: -LIBSCHED = $(top_builddir)/libsched.a +LIBSCHED = $(top_builddir)/sched/libsched.a $(LIBSCHED): cd $(top_builddir)/sched; ${MAKE} libsched.a -LIBBOINC = $(top_builddir)/libboinc.a +LIBBOINC = $(top_builddir)/lib/libboinc.a $(LIBBOINC): cd $(top_builddir)/lib; ${MAKE} libboinc.a +LIBAPI = = $(top_builddir)/api/libboinc_api.a +$(LIBAPI): + cd $(top_builddir)/api; ${MAKE} libboinc_api.a diff --git a/api/Makefile.am b/api/Makefile.am index ebf5539fff..b0936d8457 100644 --- a/api/Makefile.am +++ b/api/Makefile.am @@ -3,8 +3,8 @@ include $(top_srcdir)/Makefile.incl -AM_CFLAGS += @GLUT_CFLAGS@ -AM_LDFLAGS += @GLUT_LIBS@ +AM_CFLAGS = @GLUT_CFLAGS@ +AM_LDFLAGS = @GLUT_LIBS@ # stuff linked into both main app and graphics app api_files= \ diff --git a/apps/Makefile.am b/apps/Makefile.am index a0d6790bb0..76945ac930 100644 --- a/apps/Makefile.am +++ b/apps/Makefile.am @@ -4,7 +4,8 @@ include $(top_srcdir)/Makefile.incl bin_PROGRAMS = upper_case concat 1sec -LDADD = -L../lib -L../api -lboinc_api -lboinc $(PTHREAD_LIBS) +LDADD = $(top_builddir)/api/libboinc_api.a $(LIBBOINC) $(PTHREAD_LIBS) +AM_CXXFLAGS = $(MYSQL_CFLAGS) upper_case_SOURCES = upper_case.C concat_SOURCES = concat.C diff --git a/checkin_notes b/checkin_notes index cc67d79e29..0396494c13 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2404,3 +2404,20 @@ Rom Mar 14 2008 MainDocument.cpp clientscr/ screensaver.cpp + +Reinhard Mar 15 2008 + - fixed internal library dependencies in Makefile.am's + + Makefile.incl + clientgui/ + Makefile.am + tools/ + Makefile.am + apps/ + Makefile.am + client/ + Makefile.am + sched/ + Makefile.am + api/ + Makefile.am diff --git a/client/Makefile.am b/client/Makefile.am index 8b28a97b19..dcb9b2328f 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -63,7 +63,7 @@ boinc_client_SOURCES = \ boinc_client_DEPENDENCIES = boinc_client_CPPFLAGS = -O3 -fomit-frame-pointer -fforce-addr -ffast-math $(AM_CPPFLAGS) boinc_client_LDFLAGS = -static-libgcc -boinc_client_LDADD = -L../lib -lboinc $(PTHREAD_LIBS) +boinc_client_LDADD = $(LIBBOINC) $(PTHREAD_LIBS) boinc_clientdir = $(bindir) boinc_client_DATA = ../curl/ca-bundle.crt diff --git a/clientgui/Makefile.am b/clientgui/Makefile.am index 0d8a475fb1..c7c9df59e2 100644 --- a/clientgui/Makefile.am +++ b/clientgui/Makefile.am @@ -110,7 +110,7 @@ EXTRA_DIST = *.h \ boinc_gui_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(CLIENTGUIFLAGS) boinc_gui_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(CLIENTGUIFLAGS) -boinc_gui_LDADD = -L../lib -lboinc $(CLIENTGUILIBS) +boinc_gui_LDADD = $(LIBBOINC) $(CLIENTGUILIBS) all-local: client_gui-bin client_gui-bin: @CLIENT_GUI_BIN_FILENAME@ diff --git a/sched/Makefile.am b/sched/Makefile.am index 7c47c00834..836d5c9b05 100644 --- a/sched/Makefile.am +++ b/sched/Makefile.am @@ -37,9 +37,8 @@ EXTRA_PROGRAMS = fcgi \ # scripts that 'make install' should put in bindir bin_SCRIPTS = start stop status -LDADD = -L. -lsched $(MYSQL_LIBS) $(BOINC_LIB) $(PTHREAD_LIBS) - -LIB_SCHED = libsched.a +LDADD = $(LIBSCHED) $(LIBBOINC) $(MYSQL_LIBS) $(PTHREAD_LIBS) $(RSA_LIBS) +AM_CXXFLAGS = $(MYSQL_CFLAGS) libsched_a_SOURCES = \ sched_shmem.C \ @@ -50,7 +49,7 @@ libsched_a_SOURCES = \ ../db/db_base.C \ ../lib/msg_log.C \ ../tools/process_result_template.C \ - ../tools/backend_lib.C + ../tools/backend_lib.C EXTRA_DIST = \ assimilate_handler.h \ @@ -62,7 +61,7 @@ EXTRA_DIST = \ sched_send.h \ sched_shmem.h \ server_types.h \ - start + start cgi_SOURCES = \ @@ -100,90 +99,55 @@ include_HEADERS = \ validate_util.h -cgi_DEPENDENCIES = $(LIB_SCHED) - feeder_SOURCES = \ feeder.C \ hr.C \ hr_info.C \ ../lib/synch.C -feeder_DEPENDENCIES = $(LIB_SCHED) - wu_check_SOURCES = wu_check.C -wu_check_DEPENDENCIES = $(LIB_SCHED) show_shmem_SOURCES = show_shmem.C -show_shmem_DEPENDENCIES = $(LIB_SCHED) file_deleter_SOURCES = file_deleter.C -file_deleter_DEPENDENCIES = $(LIB_SCHED) sample_bitwise_validator_SOURCES = validator.C sample_bitwise_validator.C validate_util.C validate_util.h validate_util2.C -sample_bitwise_validator_DEPENDENCIES = $(LIB_SCHED) sample_trivial_validator_SOURCES = validator.C sample_trivial_validator.C validate_util.C validate_util.h validate_util2.C -sample_trivial_validator_DEPENDENCIES = $(LIB_SCHED) sample_dummy_assimilator_SOURCES = assimilator.C sample_dummy_assimilator.C validate_util.C validate_util.h -sample_dummy_assimilator_DEPENDENCIES = $(LIB_SCHED) sample_assimilator_SOURCES = assimilator.C sample_assimilator.C validate_util.C validate_util.h -sample_assimilator_DEPENDENCIES = $(LIB_SCHED) single_job_assimilator_SOURCES = assimilator.C single_job_assimilator.C validate_util.C validate_util.h -single_job_assimilator_DEPENDENCIES = $(LIB_SCHED) sample_work_generator_SOURCES = sample_work_generator.C -sample_work_generator_DEPENDENCIES = $(LIB_SCHED) db_dump_SOURCES = db_dump.C -db_dump_DEPENDENCIES = $(LIB_SCHED) db_purge_SOURCES = db_purge.C -db_purge_DEPENDENCIES = $(LIB_SCHED) trickle_handler_SOURCES = trickle_handler.C -trickle_handler_DEPENDENCIES = $(LIB_SCHED) update_stats_SOURCES = update_stats.C -update_stats_DEPENDENCIES = $(LIB_SCHED) file_upload_handler_SOURCES = file_upload_handler.C -file_upload_handler_DEPENDENCIES = $(LIB_SCHED) -file_upload_handler_LDADD = $(LDADD) $(RSA_LIBS) make_work_SOURCES = make_work.C -make_work_DEPENDENCIES = $(LIB_SCHED) -make_work_LDADD = $(LDADD) $(RSA_LIBS) transitioner_SOURCES = transitioner.C -transitioner_DEPENDENCIES = $(LIB_SCHED) -transitioner_LDADD = $(LDADD) $(RSA_LIBS) message_handler_SOURCES = message_handler.C -message_handler_DEPENDENCIES = $(LIB_SCHED) -message_handler_LDADD = $(LDADD) $(RSA_LIBS) request_file_list_SOURCES = request_file_list.C -request_file_list_DEPENDENCIES = $(LIB_SCHED) -request_file_list_LDADD = $(LDADD) $(RSA_LIBS) get_file_SOURCES = get_file.C -get_file_DEPENDENCIES = $(LIB_SCHED) -get_file_LDADD = $(LDADD) $(RSA_LIBS) send_file_SOURCES = send_file.C -send_file_DEPENDENCIES = $(LIB_SCHED) -send_file_LDADD = $(LDADD) $(RSA_LIBS) delete_file_SOURCES = delete_file.C -delete_file_DEPENDENCIES = $(LIB_SCHED) -delete_file_LDADD = $(LDADD) $(RSA_LIBS) sched_driver_SOURCES = sched_driver.C -sched_driver_DEPENDENCIES = $(LIB_SCHED) -sched_driver_LDADD = $(LDADD) fcgi_SOURCES = \ handle_request.C \ @@ -222,9 +186,8 @@ fcgi_SOURCES = \ ../tools/process_result_template.C \ ../tools/backend_lib.C -fcgi_DEPENDENCIES = $(LIB_SCHED) fcgi_CPPFLAGS = -include fcgi_stdio.h -D_USING_FCGI_ $(AM_CPPFLAGS) -fcgi_LDADD = $(RSA_LIBS) -lfcgi $(MYSQL_LIBS) +fcgi_LDADD = $(LDADD) -lfcgi fcgi_file_upload_handler_SOURCES = \ file_upload_handler.C \ @@ -235,9 +198,8 @@ fcgi_file_upload_handler_SOURCES = \ ../lib/parse.C \ ../lib/crypt.C -fcgi_file_upload_handler_DEPENDENCIES = $(LIB_SCHED) fcgi_file_upload_handler_CPPFLAGS = -include fcgi_stdio.h -D_USING_FCGI_ $(AM_CPPFLAGS) -fcgi_file_upload_handler_LDADD = $(LDADD) $(RSA_LIBS) -lfcgi +fcgi_file_upload_handler_LDADD = $(LDADD) -lfcgi .PHONY: PHONY-start diff --git a/tools/Makefile.am b/tools/Makefile.am index 95699bdd42..ae43d80f70 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -4,27 +4,17 @@ bin_PROGRAMS = create_work sign_executable dir_hier_path dir_hier_move EXTRA_DIST = make_project xadd update_versions dbcheck_files_exist upgrade makelog.sh cleanlogs.sh vote_monitor -# TODO: use libboinc for these: +LDADD = $(LIBSCHED) $(LIBBOINC) $(RSA_LIBS) $(MYSQL_LIBS) +AM_CXXFLAGS = $(MYSQL_CFLAGS) create_work_SOURCES = \ create_work.C -create_work_LDADD = $(SCHED_LIB) $(BOINC_LIB) $(RSA_LIBS) $(MYSQL_LIBS) - -sign_executable_SOURCES = \ +sign_executable_SOURCES = \ sign_executable.C -sign_executable_LDADD = $(BOINC_LIB) $(RSA_LIBS) $(MYSQL_LIBS) - dir_hier_path_SOURCES = \ dir_hier_path.C -dir_hier_path_LDADD = $(SCHED_LIB) $(BOINC_LIB) $(MYSQL_LIBS) - dir_hier_move_SOURCES = \ dir_hier_move.C - -dir_hier_move_LDADD = $(SCHED_LIB) $(BOINC_LIB) $(MYSQL_LIBS) - -#updater_SOURCES = updater.C -#updater_LDADD = $(BOINC_LIB)