Welcome to MilkyWay@home

Update request to the make.linux file (ppc,ppc64)

Message boards : Application Code Discussion : Update request to the make.linux file (ppc,ppc64)
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile trigggl
Avatar

Send message
Joined: 9 Jan 09
Posts: 12
Credit: 25,503,183
RAC: 0
Message 16692 - Posted: 23 Mar 2009, 19:19:44 UTC

I made an update to the 'make.linux' file to include ppc and ppc64. While I didn't confirm it for ppc, I did confirm it for ppc64 and the changes were simple enough that I'm confident it will work on ppc as well. The 'code' tags took away the 'tab' spaces so I posted it with 'pre'. I can email it if necessary. I can also supply the ppc64 binary that I compiled. Maybe someone out there could compile the ppc version.

APP_VERSION = 0.18
APP_NAME = your_app_name

BOINC_DIR = /usr/include/boinc
BOINC_API_DIR = $(BOINC_DIR)
BOINC_LIB_DIR = $(BOINC_DIR)
BOINC_LINK_DIR = /home/greg/boinc
BOINC_LIB_LINK_DIR = $(BOINC_LINK_DIR)/lib
BOINC_API_LINK_DIR = $(BOINC_LINK_DIR)/api

VARIANTFLAGS = -DGMLE_BOINC -DBOINC_APP_VERSION=$(APP_VERSION) -DBOINC_APP_NAME='"$(APP_NAME)"'

CXXFLAGS_ALL = $(VARIANTFLAGS) \
	-g \
	-I$(BOINC_DIR)

CXX_i686 = g++
CXXFLAGS_i686 = -m32 -O2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL)
LDFLAGS_i686 = -L/usr/X11R6/lib -L../../linux32_libboinc
#LDFLAGS_i686 = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR)

CXX_x86_64 = g++
CXXFLAGS_x86_64 = -O2 -msse2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL)
LDFLAGS_x86_64 = -L/usr/local/lib
#LDFLAGS_x86_64 = -L/usr/local/lib -L/usr/X11R6/lib
#LDFLAGS_x86_64 = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR)

CXX_ppc64 = g++
CXXFLAGS_ppc64 = -m64 -O2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL)
LDFLAGS_ppc64 = -L/usr/local/lib
#LDFLAGS_ppc64 = -L/usr/local/lib -L/usr/X11R6/lib
#LDFLAGS_ppc64 = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR)

CXX_ppc = g++
CXXFLAGS_ppc = -m32 -O2 -ftree-vectorize -funroll-loops $(CXXFLAGS_ALL)
LDFLAGS_ppc = -L/usr/local/lib
#LDFLAGS_ppc = -L/usr/local/lib -L/usr/X11R6/lib
#LDFLAGS_ppc = -L$(BOINC_LIB_LINK_DIR) -L$(BOINC_API_LINK_DIR)

APP_DIR = ../astronomy
FGDO_DIR = ..
SCHED_DIR = $(FGDO_DIR)/evaluation
SEARCH_DIR = $(FGDO_DIR)/searches
UTIL_DIR = $(FGDO_DIR)/util

APP_OBJS = \
	$(APP_DIR)/boinc_astronomy.o \
	$(APP_DIR)/atSurveyGeometry.o \
	$(APP_DIR)/numericalIntegration.o \
	$(APP_DIR)/parameters.o \
	$(APP_DIR)/probability.o \
	$(APP_DIR)/stCoords.o \
	$(APP_DIR)/stCnum.o \
	$(APP_DIR)/stMath.o \
	$(APP_DIR)/stVector.o \
	$(APP_DIR)/star_points.o \
	$(APP_DIR)/evaluation_optimized.o \
	$(APP_DIR)/evaluation_state.o
SEARCH_OBJS = \
	$(SEARCH_DIR)/search_parameters.o
UTIL_OBJS = \
	$(UTIL_DIR)/io_util.o \
	$(UTIL_DIR)/settings.o

PROGS = milkyway_$(APP_VERSION)_i686-pc-linux-gnu milkyway_$(APP_VERSION)_x86_64-pc-linux-gnu milkyway_$(APP_VERSION)_powerpc64-unknown-linux-gnu milkyway_$(APP_VERSION)_powerpc-unknown-linux-gnu

all: $(PROGS)

app_i686: OBJ_CXX = $(CXX_i686)
app_i686: OBJ_CXXFLAGS = $(CXXFLAGS_i686)
app_i686: $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) $(BOINC_API_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
	$(CXX_i686) $(LDFLAGS_i686) $(CXXFLAGS_i686) -Wl --export_dynamic -o milkyway_$(APP_VERSION)_i686-pc-linux-gnu $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) -lm -lboinc_api -lboinc -pthread

app_x86_64: OBJ_CXX = $(CXX_x86_64)
app_x86_64: OBJ_CXXFLAGS = $(CXXFLAGS_x86_64)
app_x86_64: $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) $(BOINC_API_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
	$(CXX_x86_64) $(LDFLAGS_x86_64) $(CXXFLAGS_x86_64) -Wl -static -static-libgcc -o milkyway_$(APP_VERSION)_x86_64-pc-linux-gnu $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) -lm -lboinc_api -lboinc -pthread

app_ppc64: OBJ_CXX = $(CXX_ppc64)
app_ppc64: OBJ_CXXFLAGS = $(CXXFLAGS_ppc64)
app_ppc64: $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) $(BOINC_API_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
	$(CXX_ppc64) $(LDFLAGS_ppc64) $(CXXFLAGS_ppc64) -Wl -static -static-libgcc -o milkyway_$(APP_VERSION)_powerpc64-unknown-linux-gnu $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) -lm -lboinc_api -lboinc -pthread

app_ppc: OBJ_CXX = $(CXX_ppc)
app_ppc: OBJ_CXXFLAGS = $(CXXFLAGS_ppc)
app_ppc: $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) $(BOINC_API_LINK_DIR)/libboinc_api.a $(BOINC_LIB_LINK_DIR)/libboinc.a
	$(CXX_ppc) $(LDFLAGS_ppc) $(CXXFLAGS_ppc) -Wl -static -static-libgcc -o milkyway_$(APP_VERSION)_powerpc-unknown-linux-gnu $(APP_OBJS) $(SEARCH_OBJS) $(UTIL_OBJS) -lm -lboinc_api -lboinc -pthread

.C.o:
	$(OBJ_CXX) $(OBJ_CXXFLAGS) $(INC) -Wall -x c++ -c $< -o $@
.c.o:
	$(OBJ_CXX) $(OBJ_CXXFLAGS) $(INC) -Wall -x c++ -c $< -o $@

clean:
	rm -f $(APP_OBJS) $(UTIL_OBJS) $(SEARCH_OBJS)

clean_all:
	rm -f $(PROGS) $(APP_OBJS) $(UTIL_OBJS) $(SEARCH_OBJS)

6r39 7ri99

Beware the dual headed Gentoo with Wine!
ID: 16692 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Profile Travis
Volunteer moderator
Project administrator
Project developer
Project tester
Project scientist

Send message
Joined: 30 Aug 07
Posts: 2046
Credit: 26,480
RAC: 0
Message 22961 - Posted: 21 May 2009, 23:03:35 UTC - in response to Message 16692.  

Thanks! I'll update the makefile (hopefully with code to compile the GPU application as well).
ID: 22961 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote

Message boards : Application Code Discussion : Update request to the make.linux file (ppc,ppc64)

©2024 Astroinformatics Group