2006-05-29 20:24:05 +00:00
|
|
|
# This should work on Linux. Modify as needed for other platforms.
|
|
|
|
|
2007-04-26 20:10:54 +00:00
|
|
|
# Change the following to match your installation
|
2008-08-01 18:14:00 +00:00
|
|
|
BOINC_DIR = ../..
|
2021-03-21 22:30:46 +00:00
|
|
|
BOINC_SOURCE_API_DIR = $(BOINC_DIR)/api
|
|
|
|
BOINC_SOURCE_LIB_DIR = $(BOINC_DIR)/lib
|
|
|
|
BOINC_SOURCE_ZIP_DIR = $(BOINC_DIR)/zip
|
|
|
|
|
2021-04-10 08:02:39 +00:00
|
|
|
ifdef ANDROID
|
2021-03-21 22:30:46 +00:00
|
|
|
BOINC_API_DIR = $(TCINCLUDES)/lib
|
|
|
|
BOINC_LIB_DIR = $(TCINCLUDES)/lib
|
|
|
|
BOINC_ZIP_DIR = $(TCINCLUDES)/lib
|
|
|
|
|
2021-04-10 08:02:39 +00:00
|
|
|
MAKEFILE_LDFLAGS =
|
|
|
|
MAKEFILE_STDLIB =
|
|
|
|
else
|
|
|
|
BOINC_API_DIR = $(BOINC_SOURCE_API_DIR)
|
|
|
|
BOINC_LIB_DIR = $(BOINC_SOURCE_LIB_DIR)
|
|
|
|
BOINC_ZIP_DIR = $(BOINC_SOURCE_ZIP_DIR)
|
|
|
|
|
|
|
|
MAKEFILE_LDFLAGS = libstdc++.a -lpthread
|
|
|
|
MAKEFILE_STDLIB = libstdc++.a
|
2021-03-21 22:30:46 +00:00
|
|
|
endif
|
2014-04-18 20:02:17 +00:00
|
|
|
|
2013-04-25 08:26:24 +00:00
|
|
|
CXXFLAGS += -g -O0 \
|
2011-06-12 20:58:43 +00:00
|
|
|
-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common \
|
2006-09-11 18:33:37 +00:00
|
|
|
-I$(BOINC_DIR) \
|
|
|
|
-I$(BOINC_LIB_DIR) \
|
|
|
|
-I$(BOINC_API_DIR) \
|
2012-11-21 17:15:17 +00:00
|
|
|
-I$(BOINC_ZIP_DIR) \
|
2006-09-11 18:33:37 +00:00
|
|
|
-L$(BOINC_API_DIR) \
|
|
|
|
-L$(BOINC_LIB_DIR) \
|
2012-11-21 17:15:17 +00:00
|
|
|
-L$(BOINC_ZIP_DIR) \
|
2006-05-29 20:24:05 +00:00
|
|
|
-L.
|
|
|
|
|
|
|
|
PROGS = wrapper
|
|
|
|
|
|
|
|
all: $(PROGS)
|
|
|
|
|
2008-10-04 18:51:38 +00:00
|
|
|
libstdc++.a:
|
2014-04-18 19:41:41 +00:00
|
|
|
ln -s `$(CXX) -print-file-name=libstdc++.a`
|
2008-10-04 18:51:38 +00:00
|
|
|
|
2013-04-26 20:46:28 +00:00
|
|
|
clean: distclean
|
2008-10-21 21:13:52 +00:00
|
|
|
|
2008-10-06 20:24:58 +00:00
|
|
|
distclean:
|
2013-04-26 20:46:28 +00:00
|
|
|
rm -f $(PROGS) *.o libstdc++.a
|
2006-05-29 20:24:05 +00:00
|
|
|
|
2020-04-27 15:54:47 +00:00
|
|
|
install: all
|
|
|
|
|
|
|
|
.PHONY: install all distclean clean
|
|
|
|
|
2012-11-20 08:24:47 +00:00
|
|
|
REGEXP_OBJS = \
|
|
|
|
regexp.o \
|
|
|
|
regsub.o \
|
|
|
|
regerror.o \
|
|
|
|
regexp_memory.o \
|
|
|
|
regexp_report.o
|
|
|
|
|
2021-04-10 08:02:39 +00:00
|
|
|
wrapper: wrapper.o $(MAKEFILE_STDLIB) $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(REGEXP_OBJS)
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) $(MAKEFILE_LDFLAGS) -lboinc_api -lboinc -lboinc_zip $(STDCPPTC)
|