2002-05-25 07:30:55 +00:00
|
|
|
DEPTH = ..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
2002-07-18 21:29:50 +00:00
|
|
|
INSTALL_DIR = /usr/local/boinc
|
|
|
|
|
2002-07-05 05:33:40 +00:00
|
|
|
CFLAGS = -g -Wall @DEFS@ \
|
|
|
|
-I@top_srcdir@/db \
|
|
|
|
-I@top_srcdir@/lib \
|
|
|
|
-I@top_srcdir@/tools \
|
2002-07-11 20:41:24 +00:00
|
|
|
-DBOINC_DB_NAME=\"$(BOINC_DB_NAME)\" \
|
2002-08-14 05:43:05 +00:00
|
|
|
-DBOINC_DB_PASSWD=\"$(BOINC_DB_PASSWD)\" \
|
2002-08-25 07:54:33 +00:00
|
|
|
-DBOINC_SHMEM_KEY=$(BOINC_SHMEM_KEY) \
|
2002-07-12 17:44:49 +00:00
|
|
|
-DBOINC_KEY_DIR=\"$(BOINC_KEY_DIR)\" \
|
2002-07-12 19:19:31 +00:00
|
|
|
-DBOINC_UPLOAD_DIR=\"$(BOINC_UPLOAD_DIR)\" \
|
2002-07-12 17:44:49 +00:00
|
|
|
-DBOINC_USER=\"$(BOINC_USER)\" \
|
2002-07-11 01:09:53 +00:00
|
|
|
-I/usr/local/mysql/include \
|
2002-07-11 20:41:24 +00:00
|
|
|
-I@top_srcdir@/RSAEuro/source \
|
2002-07-05 05:33:40 +00:00
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
CC = g++ $(CFLAGS)
|
|
|
|
|
2002-06-07 22:59:24 +00:00
|
|
|
CLIBS = @LIBS@
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-09-25 19:40:19 +00:00
|
|
|
PROGS = cgi feeder show_shmem file_upload_handler fcgi validate_test
|
2002-05-24 04:29:10 +00:00
|
|
|
|
|
|
|
all: $(PROGS)
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
CGI_OBJS = \
|
|
|
|
handle_request.o \
|
|
|
|
main.o \
|
2002-05-24 04:29:10 +00:00
|
|
|
sched_shmem.o \
|
2002-04-30 22:22:54 +00:00
|
|
|
server_types.o \
|
|
|
|
../db/db_mysql.o \
|
|
|
|
../db/mysql_util.o \
|
2002-05-24 04:29:10 +00:00
|
|
|
../lib/shmem.o \
|
2002-07-05 05:33:40 +00:00
|
|
|
../lib/parse.o
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-05-24 04:29:10 +00:00
|
|
|
FEEDER_OBJS = \
|
|
|
|
feeder.o \
|
|
|
|
sched_shmem.o \
|
|
|
|
../db/db_mysql.o \
|
|
|
|
../db/mysql_util.o \
|
|
|
|
../lib/shmem.o
|
|
|
|
|
2002-06-01 20:26:21 +00:00
|
|
|
SHOW_SHMEM_OBJS = \
|
|
|
|
show_shmem.o \
|
|
|
|
sched_shmem.o \
|
|
|
|
../db/db_mysql.o \
|
|
|
|
../db/mysql_util.o \
|
|
|
|
../lib/shmem.o
|
|
|
|
|
2002-07-05 05:33:40 +00:00
|
|
|
FILE_UPLOAD_OBJS = \
|
|
|
|
file_upload_handler.o \
|
|
|
|
../lib/crypt.o \
|
|
|
|
../lib/parse.o \
|
|
|
|
../lib/md5.o \
|
|
|
|
../lib/md5_file.o \
|
|
|
|
../RSAEuro/source/rsaeuro.a
|
|
|
|
|
2002-09-02 17:25:55 +00:00
|
|
|
VALIDATE_OBJS = \
|
|
|
|
validate.o \
|
2002-09-25 19:40:19 +00:00
|
|
|
validate_test.o \
|
|
|
|
../db/db_mysql.o \
|
|
|
|
../db/mysql_util.o \
|
|
|
|
../lib/parse.o
|
2002-09-02 17:25:55 +00:00
|
|
|
|
2002-06-21 18:31:32 +00:00
|
|
|
FCGI_OBJS = \
|
|
|
|
handle_request.fcgi.o \
|
|
|
|
main.fcgi.o \
|
|
|
|
sched_shmem.fcgi.o \
|
|
|
|
server_types.fcgi.o \
|
|
|
|
../db/db_mysql.fcgi.o \
|
|
|
|
../db/mysql_util.fcgi.o \
|
|
|
|
../lib/shmem.fcgi.o \
|
|
|
|
../lib/parse.fcgi.o \
|
2002-07-05 19:20:00 +00:00
|
|
|
../lib/crypt.fcgi.o \
|
|
|
|
../lib/md5.o \
|
|
|
|
../lib/md5_file.o \
|
|
|
|
../RSAEuro/source/rsaeuro.a \
|
2002-06-21 18:31:32 +00:00
|
|
|
../tools/process_result_template.fcgi.o
|
|
|
|
FCGI_LIBS = -lfcgi -lfcgi++
|
|
|
|
FCGI_FLAGS = -include /usr/local/include/fcgi_stdio.h -D_USING_FCGI_
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
MYSQL_DIR = /usr/local/mysql/lib
|
|
|
|
MYSQL_LIBS = \
|
2002-05-30 08:33:30 +00:00
|
|
|
-L$(MYSQL_DIR) -L/sw/lib/mysql -L/usr/local/lib/mysql \
|
2002-05-25 15:30:00 +00:00
|
|
|
-lmysqlclient -L/usr/local/lib -lz \
|
2002-06-07 21:42:19 +00:00
|
|
|
-lm $(NETLIBS)
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-06-21 18:31:32 +00:00
|
|
|
%.fcgi.o: %.C
|
|
|
|
$(CC) $(FCGI_FLAGS) -c $*.C -o $*.fcgi.o
|
|
|
|
|
2002-07-05 19:20:00 +00:00
|
|
|
%.fcgi.o: %.c
|
|
|
|
$(CC) $(FCGI_FLAGS) -c $*.c -o $*.fcgi.o
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
.C.o:
|
|
|
|
$(CC) -c -o $*.o $<
|
2002-06-21 18:31:32 +00:00
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
.c.o:
|
|
|
|
$(CC) -c -o $*.o $<
|
|
|
|
|
|
|
|
cgi: $(CGI_OBJS)
|
|
|
|
$(CC) $(CGI_OBJS) $(MYSQL_LIBS) $(CLIBS) -o cgi
|
|
|
|
|
2002-05-24 04:29:10 +00:00
|
|
|
feeder: $(FEEDER_OBJS)
|
|
|
|
$(CC) $(FEEDER_OBJS) $(MYSQL_LIBS) $(CLIBS) -o feeder
|
|
|
|
|
2002-06-01 20:26:21 +00:00
|
|
|
show_shmem: $(SHOW_SHMEM_OBJS)
|
|
|
|
$(CC) $(SHOW_SHMEM_OBJS) $(MYSQL_LIBS) $(CLIBS) -o show_shmem
|
|
|
|
|
2002-07-05 05:33:40 +00:00
|
|
|
file_upload_handler: $(FILE_UPLOAD_OBJS)
|
|
|
|
$(CC) $(FILE_UPLOAD_OBJS) $(CLIBS) -o file_upload_handler
|
|
|
|
|
2002-09-25 19:40:19 +00:00
|
|
|
validate_test: $(VALIDATE_OBJS)
|
|
|
|
$(CC) $(VALIDATE_OBJS) $(MYSQL_LIBS) $(CLIBS) -o validate_test
|
2002-09-02 17:25:55 +00:00
|
|
|
|
2002-06-21 18:31:32 +00:00
|
|
|
fcgi: $(FCGI_OBJS)
|
|
|
|
$(CC) $(FCGI_OBJS) $(MYSQL_LIBS) $(CLIBS) $(FCGI_LIBS) \
|
|
|
|
-o fcgi
|
|
|
|
|
2002-05-25 07:30:55 +00:00
|
|
|
dependencies: @srcdir@/*.C
|
2002-05-25 07:34:27 +00:00
|
|
|
$(CC) -M @srcdir@/*.C > dependencies
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
include dependencies
|
|
|
|
|
|
|
|
clean:
|
2002-05-24 04:29:10 +00:00
|
|
|
rm -f $(PROGS) *.o core dependencies config.cache
|
2002-06-21 18:31:32 +00:00
|
|
|
|
|
|
|
install: $(PROGS)
|
2002-07-18 21:29:50 +00:00
|
|
|
-mkdir -p $(INSTALL_DIR)/cgi
|
|
|
|
-mkdir -p $(INSTALL_DIR)/sched
|
|
|
|
cp fcgi $(INSTALL_DIR)/cgi/fcgi
|
|
|
|
cp cgi $(INSTALL_DIR)/cgi/cgi
|
|
|
|
cp feeder $(INSTALL_DIR)/sched/feeder
|
|
|
|
cp show_shmem $(INSTALL_DIR)/sched/show_shmem
|
|
|
|
cp file_upload_handler $(INSTALL_DIR)/cgi/file_upload_handler
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
$(RM) -r $(INSTALL_DIR)/cgi;
|
|
|
|
$(RM) -r $(INSTALL_DIR)/sched;
|