📄 makefile
字号:
# 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.# Modified March 11th by Michael Tughan for Mac OS X# Original for Linux, from the source downloaded January 21st and March 10thdefault: aisystemall: 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 = 1MINOR_VERSION = 05# SDK paths for OS X, using Xcode 3# SDK for Intel 32-bit (Tiger min)I686_APPLE_DARWIN_SDK = /Developer/SDKs/MacOSX10.4u.sdk# SDK for Intel 64-bit (Leopard min)X86-64_APPLE_DARWIN_SDK = /Developer/SDKs/MacOSX10.5.sdk# SDK for PowerPC 32-bit (Panther min)POWERPC_APPLE_DARWIN_SDK = /Developer/SDKs/MacOSX10.3.9.sdk# CFLAGS and CXXFLAGS for Intel 32-bitI686_APPLE_DARWIN_CFLAGS = -O3 -msse -msse2 -msse3 -mfpmath=sse -arch i386 -isysroot $(I686_APPLE_DARWIN_SDK) -mmacosx-version-min=10.4# CFLAGS and CXXFLAGS for Intel 64-bitX86-64_APPLE_DARWIN_CFLAGS = -O3 -msse -msse2 -msse3 -mfpmath=sse -arch x86_64 -isysroot $(X86-64_APPLE_DARWIN_SDK) -mmacosx-version-min=10.5# CFLAGS and CXXFLAGS for PowerPC 32-bitPOWERPC_APPLE_DARWIN_CFLAGS = -O3 -maltivec -mabi=altivec -arch ppc -isysroot $(POWERPC_APPLE_DARWIN_SDK) -mmacosx-version-min=10.3# BOINC name for Intel 32-bitI686_APPLE_DARWIN_ARCH = i686-apple-darwin# BOINC name for Intel 64-bitX86-64_APPLE_DARWIN_ARCH = x86_64-apple-darwin# BOINC name for PowerPC 32-bitPOWERPC_APPLE_DARWIN_ARCH = powerpc-apple-darwin# Define what architecture we're building forBUILD_ARCH = $(POWERPC_APPLE_DARWIN_ARCH)# The variables in CFLAGS and LDFLAGS have to be customized as wellBIN_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_PREFIXBOINC_BUILD=/Users/mtughan/boinc/boinc# NOTE: Not used# B) Use BOINC_PREFIX to point to where you have installed BOINC# There should be lib and include/BOINC directories under it.BOINC_PREFIX=/Users/mtughan/boinc/boinc-install# This is used for OS X, although I don't have my includes under include/BOINC, but just under include/# C) Use APP_BUILD to point to the directory where the application# was installedAPP_BUILD=/Users/mtughan/Downloads/aisystem/src# The directory libjpeg was installed in# There should be a lib and include directories under hereJPEG_DIR=/Users/mtughan/boinc/jpeg# 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_GRAPHICSDEFS=################### Header files:#B)INCLUDES= -I$(BOINC_PREFIX)/include/BOINC #A)INCLUDES=-I$(JPEG_DIR)/include -I$(BOINC_PREFIX)/include -I$(APP_BUILD)############### Libraries:# Flags to set static/dynamic loading of libraries for more portable appsLDSTATIC=LDDYNAMIC=# NOTE: I have built all my libraries as static, so these flags aren't necessary on my OS X system# BOINC libraries, other stuff#A)LIBDIRS= -L. -L$(BOINC_PREFIX)/lib -L$(JPEG_DIR)/lib#B)LIBDIRS= -L$(BOINC_PREFIX)/lib LIBS= $(LIBDIRS) -lboinc_api -lboinc# Libraries for graphics apps:GLIBS= -lboinc_graphics2 -framework OpenGL -framework GLUT -ljpeg# Libraries for everything, static or dynamicLIBS2= # 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 = $(POWERPC_APPLE_DARWIN_CFLAGS)CXX = g++CXXCPP = g++ -ECXXFLAGS = $(CFLAGS)LDFLAGS = -pthread -Wl,-syslibroot,$(POWERPC_APPLE_DARWIN_SDK)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 itOBJECTS= $(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.oGRAPHICS= $(APP_SRC)/graphics.oaisystem: $(OBJECTS) $(GRAPHICS) $(CXXLINK) $+ $(LIBS) $(GLIBS) strip $@ ln -f $@ $(BIN_FILENAME)channel0.o: $(APP_SRC)/channel0.cdata.o: $(APP_SRC)/data.cdatabase.o: $(APP_SRC)/database.cerror.o: $(APP_SRC)/error.cfile.o: $(APP_SRC)/file.cinjection.o: $(APP_SRC)/injection.cintegration.o: $(APP_SRC)/integration.clist.o: $(APP_SRC)/list.cobject.o: $(APP_SRC)/object.csettings.o: $(APP_SRC)/setting.csimulation.o: $(APP_SRC)/simulation.csqlite3.o: $(APP_SRC)/sqlite3.csynapse.o: $(APP_SRC)/synapse.cutil.o: $(APP_SRC)/util.cuuid.o: $(APP_SRC)/uuid.cxml.o: $(APP_SRC)/xml.cgraphics.o: $(APP_SRC)/graphics.cppmain_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: aisystem otool -L 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 standaloneclean: 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.txtveryclean: clean rm -f *.o rm -f out.txt out rm -f aisystem_*_$(I686_APPLE_DARWIN) rm -f aisystem_*_$(X86-64_APPLE_DARWIN) rm -f aisystem_*_$(POWERPC_APPLE_DARWIN)distclean: veryclean rm -f *~
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -