experimental makefile for eventual Linux port (not currently functional);
dummy stdafx.h added to Common/Include for GCC build
This commit is contained in:
Родитель
4dd6d2f100
Коммит
ff71e32586
|
@ -0,0 +1,5 @@
|
|||
// dummy stdafx.h file for Linux version
|
||||
|
||||
// In the Windows build, there are several stdafx.h files which are used for project-specific precompilation of headers.
|
||||
// In Linux, this is not used. By placing this dummy file ahead of all other stdafx.h in the include search path,
|
||||
// we make sure it compiles while not getting confused by Windows-specific content of those files.
|
|
@ -0,0 +1,48 @@
|
|||
# WORK IN PROGRESS, not currently complete nor usable
|
||||
|
||||
# makefile for a Linux/GCC build of CNTK
|
||||
# This needs ACML_PATH. E.g. in tcsh, say: setenv ACML_PATH C:/AMD/acml5.3.1/ifort64_mp
|
||||
|
||||
# This is work in progress and not at all complete or usable.
|
||||
#
|
||||
# The Linux and Windows versions are not different branches, but rather build off the same
|
||||
# source files, using different makefiles. This current makefile has the purpose of enabling
|
||||
# work to make all sources compile with GCC, and also to check for GCC-compat regressions due to
|
||||
# modifications which are currently done under Windows.
|
||||
#
|
||||
# The planned steps are:
|
||||
# - runnable non-GPU GCC-built version under Cygwin
|
||||
# - get all CPU-only sources to compile with GCC/x64 under Cygwin --currently ongoing work
|
||||
# - port the dynamic-loading mechanism
|
||||
# - runnable non-GPU version on actual Linux
|
||||
# - enable CUDA on Linux (=makefile code and figuring out the right compiler options)
|
||||
#
|
||||
# Any help is welcome, of course!
|
||||
#
|
||||
# This makefile will be extended/completed as we go.
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
#SRC := Common/File.cpp Math/Math/Matrix.cpp
|
||||
#OBJ := $(SRC:%.cpp=%.obj)
|
||||
#DEP := $(OBJ:%.obj=%.dep)
|
||||
|
||||
INCFLAGS = -I Common/Include -I Math/Math -I $(ACML_PATH)/include
|
||||
|
||||
COMMON_SRC = Common/fileutil.cpp Common/DataWriter.cpp Common/ConfigFile.cpp Common/DataReader.cpp \
|
||||
Common/Eval.cpp Common/File.cpp Common/NetworkDescriptionLanguage.cpp Common/BestGpu.cpp
|
||||
|
||||
MATH_SRC = Math/Math/Matrix.obj Math/Math/CPUMatrix.obj Math/Math/CPUSparseMatrix.obj Math/Math/GPUDummy.obj
|
||||
|
||||
SRC = $(MATH_SRC) $(COMMON_SRC)
|
||||
|
||||
all: ${SRC:.cpp=.obj}
|
||||
|
||||
|
||||
CFLAGS = -std=c++0x -std=c++11 -DCPUONLY -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -fpermissive
|
||||
|
||||
%.obj: %.cpp
|
||||
gcc -c -o $@ $(CPPFLAGS) $(CFLAGS) $(INCFLAGS) -MD -MP -MF ${@:.obj=.dep} $<
|
||||
|
||||
# .dep files created by -MD option in the gcc call
|
||||
-include $(DEP)
|
Загрузка…
Ссылка в новой задаче