diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea2f41b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pod-build/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..06d6f61 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ICPCUDA"] + path = ICPCUDA + url = git@github.com:ipab-slmc/ICPCUDA.git diff --git a/ICPCUDA b/ICPCUDA new file mode 160000 index 0000000..ea4e9bf --- /dev/null +++ b/ICPCUDA @@ -0,0 +1 @@ +Subproject commit ea4e9bf98091c29d3cd9b47104c34c736398c225 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3d29d33 --- /dev/null +++ b/Makefile @@ -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