diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2008-12-16 21:25:03 -0500 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2008-12-16 21:25:03 -0500 |
commit | 4c301992967b2bf1cbce03dcaf52947f7bff8512 (patch) | |
tree | a0a8d376f13c7d9cc3407a52f8d560212e366279 /Makefile | |
parent | 4be89372100418453447d7d58fee4ea29b9b23f1 (diff) |
build using cmake
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 259 |
1 files changed, 144 insertions, 115 deletions
@@ -1,118 +1,147 @@ -TOP = . -include $(TOP)/configs/current - - -CL_SOURCES = \ - src/api_command.cpp \ - src/api_context.cpp \ - src/api_device.cpp \ - src/api_enqueue.cpp \ - src/api_event.cpp \ - src/api_flush.cpp \ - src/api_kernel.cpp \ - src/api_memory.cpp \ - src/api_platform.cpp \ - src/api_profiling.cpp \ - src/api_program.cpp \ - src/api_sampler.cpp \ - src/device.cpp - -CPUWS_SOURCES = \ - cpuwinsys/cpuwinsys.c - -### All the core C sources - -ALL_SOURCES = \ - $(CL_SOURCES) \ - $(CPUWS_SOURCES) - - -### Object files -CL_OBJECTS = \ - $(CL_SOURCES:.cpp=.o) \ - $(CPUWS_SOURCES:.c=.o) - -### Include directories - -INCLUDE_DIRS = \ - -I$(TOP) \ - -I$(TOP)/include \ - -I$(GALLIUM)/include \ - -I$(GALLIUM)/src/gallium/include \ - -I$(GALLIUM)/src/gallium/auxiliary \ - -I$(GALLIUM)/src/gallium/drivers - -CL_LIB = OpenCL -CL_LIB_NAME = lib$(CL_LIB).so - -CL_MAJOR = 1 -CL_MINOR = 0 -CL_TINY = 0 - -GALLIUM_LIBS = \ - $(GALLIUM)/src/gallium/auxiliary/pipebuffer/libpipebuffer.a \ - $(GALLIUM)/src/gallium/auxiliary/sct/libsct.a \ - $(GALLIUM)/src/gallium/auxiliary/draw/libdraw.a \ - $(GALLIUM)/src/gallium/auxiliary/rtasm/librtasm.a \ - $(GALLIUM)/src/gallium/auxiliary/translate/libtranslate.a \ - $(GALLIUM)/src/gallium/auxiliary/cso_cache/libcso_cache.a \ - $(GALLIUM)/src/gallium/auxiliary/tgsi/libtgsi.a \ - $(GALLIUM)/src/gallium/auxiliary/util/libutil.a \ - $(GALLIUM)/src/gallium/drivers/softpipe/libsoftpipe.a - -.SUFFIXES : .cpp - -.c.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - -.cpp.o: - $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@ - -.S.o: - $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ - - -default: depend subdirs $(TOP)/$(LIB_DIR)/$(CL_LIB_NAME) - -# Make the OpenCL library -$(TOP)/$(LIB_DIR)/$(CL_LIB_NAME): $(CL_OBJECTS) $(GALLIUM_LIBS) - $(TOP)/bin/mklib -o $(CL_LIB) \ - -major $(CL_MAJOR) \ - -minor $(CL_MINOR) \ - -patch $(CL_TINY) \ - -install $(TOP)/$(LIB_DIR) \ - $(CL_OBJECTS) $(GALLIUM_LIBS) \ - -Wl,--whole-archive $(LIBS) -Wl,--no-whole-archive $(SYS_LIBS) - -###################################################################### -# Generic stuff - -depend: $(ALL_SOURCES) - @ echo "running $(MKDEP)" - @ rm -f depend # workaround oops on gutsy?!? - @ touch depend - @ $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(ALL_SOURCES) \ - > /dev/null 2>/dev/null - - -subdirs: - -install: default - $(INSTALL) -d $(INSTALL_DIR)/include/OpenCL - $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR) - $(INSTALL) -m 644 $(TOP)/include/OpenCL/*.h $(INSTALL_DIR)/include/OpenCL - @if [ -e $(TOP)/$(LIB_DIR)/$(CL_LIB_NAME) ]; then \ - $(INSTALL) $(TOP)/$(LIB_DIR)/libOpenCL* $(INSTALL_DIR)/$(LIB_DIR); \ - fi - -# Emacs tags -tags: - etags `find . -name \*.[ch]` $(TOP)/include/OpenCL/*.h +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 2.6 -clean: - -rm -f */*.o - -rm -f */*/*.o - -rm -f depend depend.bak +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canoncical targets will work. +.SUFFIXES: + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake -include depend +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/zack/projects/clover + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/zack/projects/clover + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." + /usr/bin/cmake -i . +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/zack/projects/clover/CMakeFiles /home/zack/projects/clover/CMakeFiles/progress.make + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/zack/projects/clover/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named OpenCL + +# Build rule for target. +OpenCL: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 OpenCL +.PHONY : OpenCL + +# fast build rule for target. +OpenCL/fast: + $(MAKE) -f src/CMakeFiles/OpenCL.dir/build.make src/CMakeFiles/OpenCL.dir/build +.PHONY : OpenCL/fast + +#============================================================================= +# Target rules for targets named basic + +# Build rule for target. +basic: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 basic +.PHONY : basic + +# fast build rule for target. +basic/fast: + $(MAKE) -f examples/trivial/CMakeFiles/basic.dir/build.make examples/trivial/CMakeFiles/basic.dir/build +.PHONY : basic/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... rebuild_cache" + @echo "... OpenCL" + @echo "... basic" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system |