diff src/Makefile @ 41:087d7b61c86b

cbc cmake version
author kono
date Sat, 02 Mar 2019 19:01:03 +0900
parents 83c23a36980d
children
line wrap: on
line diff
--- a/src/Makefile	Sat Mar 02 18:37:03 2019 +0900
+++ b/src/Makefile	Sat Mar 02 19:01:03 2019 +0900
@@ -1,75 +1,178 @@
-# specify path to QEMU, installed with MacPorts 
-QEMU = qemu-system-arm
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.13
+
+# Default target executed when no arguments are given to make.
+default_target: all
+
+.PHONY : default_target
+
+# Allow only one "make -f Makefile2" at a time, but pass parallelism.
+.NOTPARALLEL:
+
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
 
-include makefile.inc
+# Remove some rules from gmake that .SUFFIXES does not remove.
+SUFFIXES =
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+
+# Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
 
-# link the libgcc.a for __aeabi_idiv. ARM has no native support for div
-LIBS = $(LIBGCC)
+# 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/local/Cellar/cmake/3.13.4/bin/cmake
 
-OBJS = \
-	lib/string.o \
-	\
-	arm.o\
-	asm.o\
-	bio.o\
-	buddy.o\
-	console.o\
-	exec.o\
-	file.o\
-	fs.o\
-	log.o\
-	main.o\
-	memide.o\
-	pipe.o\
-	proc.o\
-	spinlock.o\
-	start.o\
-	swtch.o\
-	syscall.o\
-	sysfile.o\
-	sysproc.o\
-	trap_asm.o\
-	trap.o\
-	vm.o \
-	\
-	device/picirq.o \
-	device/timer.o \
-	device/uart.o
+# The command to remove a file.
+RM = /usr/local/Cellar/cmake/3.13.4/bin/cmake -E remove -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /Users/one/src/xv6-gears/src
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /Users/one/src/xv6-gears/src
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# 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/local/Cellar/cmake/3.13.4/bin/cmake -S$(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
+
+# Special rule for the target edit_cache
+edit_cache:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
+	/usr/local/Cellar/cmake/3.13.4/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+
+.PHONY : edit_cache/fast
+
+# The main all target
+all: cmake_check_build_system
+	$(CMAKE_COMMAND) -E cmake_progress_start /Users/one/src/xv6-gears/src/CMakeFiles /Users/one/src/xv6-gears/src/CMakeFiles/progress.marks
+	$(MAKE) -f CMakeFiles/Makefile2 all
+	$(CMAKE_COMMAND) -E cmake_progress_start /Users/one/src/xv6-gears/src/CMakeFiles 0
+.PHONY : all
 
-KERN_OBJS = $(OBJS) entry.o
-kernel.elf: $(addprefix build/,$(KERN_OBJS)) kernel.ld build/initcode build/fs.img
-	cp -f build/initcode initcode
-	cp -f build/fs.img fs.img
-	$(call LINK_BIN, kernel.ld, kernel.elf, \
-		$(addprefix build/,$(KERN_OBJS)), \
-		initcode fs.img)
-	$(OBJDUMP) -S kernel.elf > kernel.asm
-	$(OBJDUMP) -t kernel.elf | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > kernel.sym
-	rm -f initcode fs.img
+# 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
 
-qemu: kernel.elf
-	@clear
-	@echo "Press Ctrl-A and then X to terminate QEMU session\n"
-	$(QEMU) -M versatilepb -m 128 -cpu arm1176  -nographic -kernel kernel.elf
+# clear depends
+depend:
+	$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+#=============================================================================
+# Target rules for targets named kernel
+
+# Build rule for target.
+kernel: cmake_check_build_system
+	$(MAKE) -f CMakeFiles/Makefile2 kernel
+.PHONY : kernel
+
+# fast build rule for target.
+kernel/fast:
+	$(MAKE) -f CMakeFiles/kernel.dir/build.make CMakeFiles/kernel.dir/build
+.PHONY : kernel/fast
+
+c/kernel-context.o: c/kernel-context.c.o
+
+.PHONY : c/kernel-context.o
 
-INITCODE_OBJ = initcode.o
-$(addprefix build/,$(INITCODE_OBJ)): initcode.S
-	$(call build-directory)
-	$(call AS_WITH, -nostdinc -I.)
+# target to build an object file
+c/kernel-context.c.o:
+	$(MAKE) -f CMakeFiles/kernel.dir/build.make CMakeFiles/kernel.dir/c/kernel-context.c.o
+.PHONY : c/kernel-context.c.o
+
+c/kernel-context.i: c/kernel-context.c.i
+
+.PHONY : c/kernel-context.i
 
-#initcode is linked into the kernel, it will be used to craft the first process
-build/initcode: $(addprefix build/,$(INITCODE_OBJ))
-	$(call LINK_INIT, -N -e start -Ttext 0)
-	$(call OBJCOPY_INIT)
-	$(OBJDUMP) -S $< > initcode.asm
+# target to preprocess a source file
+c/kernel-context.c.i:
+	$(MAKE) -f CMakeFiles/kernel.dir/build.make CMakeFiles/kernel.dir/c/kernel-context.c.i
+.PHONY : c/kernel-context.c.i
+
+c/kernel-context.s: c/kernel-context.c.s
+
+.PHONY : c/kernel-context.s
+
+# target to generate assembly for a file
+c/kernel-context.c.s:
+	$(MAKE) -f CMakeFiles/kernel.dir/build.make CMakeFiles/kernel.dir/c/kernel-context.c.s
+.PHONY : c/kernel-context.c.s
 
-build/fs.img:
-	make -C tools
-	make -C usr
+# 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 "... rebuild_cache"
+	@echo "... edit_cache"
+	@echo "... kernel"
+	@echo "... c/kernel-context.o"
+	@echo "... c/kernel-context.i"
+	@echo "... c/kernel-context.s"
+.PHONY : help
 
-clean: 
-	rm -rf build
-	rm -f *.o *.d *.asm *.sym vectors.S bootblock entryother \
-	initcode initcode.out kernel xv6.img fs.img kernel.elf memfs
-	make -C tools clean
-	make -C usr clean
+
+
+#=============================================================================
+# 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) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+