-
Notifications
You must be signed in to change notification settings - Fork 103
/
Makefile
43 lines (29 loc) · 1002 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This is a commodity fake Makefile that allows people to run the build from the
# project's root directory, instead of entering in the build/ directory first.
MAKEFLAGS += --no-print-directory
TCROOT_PARENT ?= ./
TCROOT ?= $(TCROOT_PARENT)/toolchain2
PREREQUISITES := $(TCROOT) build/CMakeCache.txt
all: $(PREREQUISITES)
@$(MAKE) -C build
gtests: $(PREREQUISITES)
@$(MAKE) -C build gtests
clean: $(PREREQUISITES)
@$(MAKE) -C build clean
# Rem is a shortcut for rebuild_img
rem: $(PREREQUISITES)
@rm -rf ./build/fatpart ./build/tilck.img
@$(MAKE) -C build
rebuild_img: $(PREREQUISITES)
@rm -rf ./build/fatpart ./build/tilck.img
@$(MAKE) -C build
config: $(PREREQUISITES)
@./scripts/run_config
menuconfig: $(PREREQUISITES)
@./scripts/run_config
$(TCROOT):
$(error Before building Tilck, you need to build the toolchain by running ./scripts/build_toolchain)
build/CMakeCache.txt:
@echo No CMakeCache.txt found: running CMake first.
@./scripts/cmake_run
.PHONY: all gtests clean