📄 makefile_x
字号:
# Makefile for the BOINC program
#
# Unpack this in boinc/apps/aisystem and say 'make aisystem' to make
# a BOINC application which tests the BOINC graphics API.
# Can be built either using A) the directory in which BOINC was built,
# or B) the location where BOINC was installed. Uncomment accordingly.
#######################################################################
# By default we build the boinclet to test the graphics first.
default: aisystem
all: boinclet aisystem
# Version of app we are building (change as appropriate):
# (Major version of an app must match major version of BOINC core client!)
MAJOR_VERSION = 1
MINOR_VERSION = 03
#LINUX
BUILD_ARCH=i686-pc-linux-gnu#MAC
#BUILD_ARCH=powerpc-apple-darwin
BIN_FILENAME = aisystem_$(MAJOR_VERSION).$(MINOR_VERSION)_$(BUILD_ARCH)
# A) Use BOINC_BUILD to point to where you built BOINC
# Use this if it was not yet installed in BOINC_PREFIX
BOINC_BUILD= /home/ovi/boinc
# B) Use BOINC_PREFIX to point to where you have installed BOINC
# There should be lib and include/BOINC directories under it.
BOINC_PREFIX=/home/ovi/boinc
# C) Use APP_BUILD to point to the directory where the application
# was installed
APP_BUILD=/home/ovi/source/aisystem/src
# D)
APP_SRC=..
# compiler custom flags (if you need these, eg. to enable graphics )
# Linux graphics apps need -D_REENTRANT for separate compute/graphics threads
# Need -DUSE_GLUT to be able to use GLUT text functions
#DEFS= -DHAVE_DIRENT_H
#DEFS= -DBOINC_APP_GRAPHICS -D_REENTRANTDEFS= -D_REENTRANT
##################
# Header files:
#B)INCLUDES= -I$(BOINC_PREFIX)/include/BOINC
#A)
INCLUDES= -I$(BOINC_BUILD)/api -I$(BOINC_BUILD)/lib -I$(BOINC_BUILD) -I$(APP_BUILD)
##############
# Libraries:
# Flags to set static/dynamic loading of libraries for more portable apps
LDSTATIC=-Wl,-Bstatic
LDDYNAMIC=-Wl,-Bdynamic
# BOINC libraries, other stuff
#A)
LIBDIRS= -L. -L$(BOINC_BUILD)/api -L$(BOINC_BUILD)/lib -L/lib -L/usr/lib -L/usr/local/lib
#B)LIBDIRS= -L$(BOINC_PREFIX)/lib
LIBS= $(LIBDIRS) -lboinc_api -lboinc -ldl \
$(LDSTATIC) -lgcc -lstdc++ -lc -lm
# Libraries for graphics apps:
GLIBS= -L/usr/lib \
$(LDSTATIC) -lboinc_graphics_api -lboinc_graphics_lib \
$(LDSTATIC) -lboinc_graphics_impl \
$(LDDYNAMIC) -lX11 -lXmu -lXext -lXi -lSM -lICE
# Libraries for everything, static or dynamic
LIBS2= $(LDSTATIC) -lstdc++ -lgcc $(LDDYNAMIC) -lc -lm
# if we need to compile with debug information use:# CFLAGS = -g
# CXXFLAGS = -g
# How to invoke the C++ compiler:CC = gccCCLINK = $(CC) -o $@ $(LDFLAGS)CFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXFLAGS =
LDFLAGS = -pthread CCCOMPILE = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS)
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
CXXLINK = $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS)
#CXXLINK = $(CXX) $(LDFLAGS) -o $@ $+ $(LIBS)
# What we gotta make, and how to do it
OBJECTS= $(APP_SRC)/channel0.o $(APP_SRC)/data.o $(APP_SRC)/database.o $(APP_SRC)/error.o \
$(APP_SRC)/file.o $(APP_SRC)/injection.o $(APP_SRC)/integration.o $(APP_SRC)/list.o \
$(APP_SRC)/object.o $(APP_SRC)/setting.o $(APP_SRC)/simulation.o $(APP_SRC)/sqlite3.o \
$(APP_SRC)/synapse.o $(APP_SRC)/util.o $(APP_SRC)/uuid.o $(APP_SRC)/xml.o \
$(APP_SRC)/main_boinc.o
aisystem: $(OBJECTS)
$(CXXLINK) $+ $(LIBS) $(GLIBS)
strip $@
ln -f $@ $(BIN_FILENAME)
channel0.o: $(APP_SRC)/channel0.c
data.o: $(APP_SRC)/data.c
database.o: $(APP_SRC)/database.c
error.o: $(APP_SRC)/error.cfile.o: $(APP_SRC)/file.c
injection.o: $(APP_SRC)/injection.c
integration.o: $(APP_SRC)/integration.c
list.o: $(APP_SRC)/list.c
object.o: $(APP_SRC)/object.c
settings.o: $(APP_SRC)/setting.c
simulation.o: $(APP_SRC)/simulation.c
sqlite3.o: $(APP_SRC)/sqlite3.c
synapse.o: $(APP_SRC)/synapse.c
util.o: $(APP_SRC)/util.c
uuid.o: $(APP_SRC)/uuid.c
xml.o: $(APP_SRC)/xml.cmain_boinc.o: $(APP_SRC)/main_boinc.cpp
# How to compile.cpp.o: $(CXXCOMPILE) -c $< -o $@ .c.o:
$(CCCOMPILE) -c $< -o $@
# For testing dynamics loading:
ldd: clean aisystem
ldd aisystem
# You can run the app "standalone" if you create an output file
# called "out.txt" first:
out:
touch out.txt
# Cleaning removes the executable and object, also the long named
# executable, and any files left from running standalone
clean:
rm -f aisystem
rm -f $(APP_SRC)/graphics.o $(APP_SRC)/channel0.o $(APP_SRC)/data.o $(APP_SRC)/database.o \
$(APP_SRC)/error.o $(APP_SRC)/file.o $(APP_SRC)/injection.o $(APP_SRC)/integration.o $(APP_SRC)/list.o \
$(APP_SRC)/object.o $(APP_SRC)/setting.o $(APP_SRC)/simulation.o $(APP_SRC)/sqlite3.o \ $(APP_SRC)/synapse.o $(APP_SRC)/util.o $(APP_SRC)/uuid.o $(APP_SRC)/xml.o $(APP_SRC)/main_boinc.o
rm -f $(BIN_FILENAME) $(BIN_FILENAME).gz $(BIN_FILENAME).sig
rm -f boinc_finish_called boinc_lockfile init_data.xml
rm -f stderr.txt ckpt_state
rm -f aisystem_?.??_$(BUILD_ARCH)
cat /dev/null > out.txt
veryclean: clean
rm -f *.o
rm -f out.txt out
rm -f aisystem_*_i686-*-linux-gnu
rm -f aisystem_*_windows_intelx86.exe
rm -f aisystem_*_powerpc-apple-darwin
distclean: veryclean
rm -f *~
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -