-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 898 Bytes
/
Makefile
File metadata and controls
39 lines (32 loc) · 898 Bytes
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
.PHONY: all build clean configure help
BUILD_DIR := build
CMAKE_OPTS :=
ifdef CROSS_COMPILE
CMAKE_OPTS += -DCROSS_COMPILE=$(CROSS_COMPILE)
endif
all: build
configure:
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR) && cmake $(CMAKE_OPTS) ..
build: configure
@cd $(BUILD_DIR) && $(MAKE)
clean:
@if [ -d "$(BUILD_DIR)" ]; then cd $(BUILD_DIR) && $(MAKE) clean-all; fi
@rm -rf $(BUILD_DIR)
help:
@echo "ViOS Build System"
@echo ""
@echo "Targets:"
@echo " all - Configure and build (default)"
@echo " build - Build the project"
@echo " configure - Run CMake configuration"
@echo " clean - Clean all build artifacts"
@echo " help - Show this help"
@echo ""
@echo "Options:"
@echo " CROSS_COMPILE - Cross-compiler prefix (e.g., x86_64-elf-)"
@echo ""
@echo "Examples:"
@echo " make"
@echo " make CROSS_COMPILE=x86_64-linux-gnu-"
@echo " make clean"