Skip to content

Commit

Permalink
start up
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Fallon committed Aug 20, 2015
1 parent 8d135e5 commit 9a2d83e
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pod-build/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ICPCUDA"]
path = ICPCUDA
url = [email protected]:ipab-slmc/ICPCUDA.git
1 change: 1 addition & 0 deletions ICPCUDA
Submodule ICPCUDA added at ea4e9b
67 changes: 67 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
DL_LINK = http://bitbucket.org/eigen/eigen/get/3.2.1.tar.gz
DL_NAME = 3.2.1.tar.gz
UNZIP_DIR = ICPCUDA


default_target: all

# Default to a less-verbose build. If you want all the gory compiler output,
# run "make VERBOSE=1"
$(VERBOSE).SILENT:

# Figure out where to build the software.
# Use BUILD_PREFIX if it was passed in.
# If not, search up to four parent directories for a 'build' directory.
# Otherwise, use ./build.
ifeq "$(BUILD_PREFIX)" ""
BUILD_PREFIX:=$(shell for pfx in ./ .. ../.. ../../.. ../../../..; do d=`pwd`/$$pfx/build;\
if [ -d $$d ]; then echo $$d; exit 0; fi; done; echo `pwd`/build)
endif
# create the build directory if needed, and normalize its path name
BUILD_PREFIX:=$(shell mkdir -p $(BUILD_PREFIX) && cd $(BUILD_PREFIX) && echo `pwd`)

# Default to a release build. If you want to enable debugging flags, run
# "make BUILD_TYPE=Debug"
ifeq "$(BUILD_TYPE)" ""
BUILD_TYPE="Release"
endif

SED=sed
ifeq ($(shell uname), Darwin)
SED=gsed
endif

all: pod-build/Makefile
@echo "kjk"
$(MAKE) -C pod-build all #install

pod-build/Makefile:
@echo "kjk2"
$(MAKE) configure

.PHONY: configure
configure: $(UNZIP_DIR)/src/CMakeLists.txt
@echo "\nBUILD_PREFIX: $(BUILD_PREFIX)\n\n"

# create the temporary build directory if needed
@mkdir -p pod-build

@echo "kjk222 "

# create the lib directory if needed, so the pkgconfig gets installed to the right place
@mkdir -p $(BUILD_PREFIX)/lib
@mkdir -p $(BUILD_PREFIX)/lib/pkgconfig

@echo "kjk222 3"

# run CMake to generate and configure the build scripts
@cd pod-build && cmake -DCMAKE_INSTALL_PREFIX=$(BUILD_PREFIX) \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ../$(UNZIP_DIR)/src

#$(UNZIP_DIR)/CMakeLists.txt:
# wget --no-check-certificate $(DL_LINK) && tar -xzf $(DL_NAME) && rm $(DL_NAME)
# $(SED) -i -e 's@share/pkgconfig@lib/pkgconfig@g' $(UNZIP_DIR)/CMakeLists.txt

clean:
-if [ -e pod-build/install_manifest.txt ]; then rm -f `cat pod-build/install_manifest.txt`; fi
-if [ -d pod-build ]; then $(MAKE) -C pod-build clean; rm -rf pod-build; fi

0 comments on commit 9a2d83e

Please sign in to comment.