-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
80 lines (57 loc) · 1.36 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Copyright (c) 2014, 2015, Chris Smeele
# All rights reserved.
# Parameters {{{
ifdef VERBOSE
Q :=
E := @true
else
Q := @
E := @echo
MAKEFLAGS += --no-print-directory
endif
# }}}
# Package metadata {{{
PACKAGE_NAME := stoomboot
PACKAGE_VERSION := $(shell git describe --always --dirty)
ifndef PACKAGE_VERSION
PACKAGE_VERSION := 9999
endif
# }}}
# Directories {{{
STAGE1DIR := stage1
STAGE2DIR := stage2
# }}}
# Source and intermediate files {{{
STAGE1_MBR_BIN := $(STAGE1DIR)/bin/$(PACKAGE_NAME)-stage1-mbr.bin
STAGE1_FAT32_BIN := $(STAGE1DIR)/bin/$(PACKAGE_NAME)-stage1-fat32.bin
STAGE2_BIN := $(STAGE2DIR)/bin/$(PACKAGE_NAME)-stage2.bin
# }}}
-include Makefile.local
# Make targets {{{
.PHONY: all clean clean-all stage1-mbr-bin stage1-fat32-bin stage2-bin
all: $(STAGE1_MBR_BIN) $(STAGE2_BIN)
clean:
$(E) " CLEAN $(OUTFILES)"
$(Q)rm -f $(OUTFILES)
clean-all: clean
$(Q)$(MAKE) -C $(STAGE1DIR) clean
$(Q)$(MAKE) -C $(STAGE2DIR) clean
$(STAGE1_MBR_BIN): stage1-mbr-bin ;
stage1-mbr-bin:
$(E) ""
$(E) "Stage 1 (MBR)"
$(E) "============="
$(Q)$(MAKE) -C $(STAGE1DIR) bin-mbr
$(STAGE1_FAT32_BIN): stage1-fat32-bin ;
stage1-fat32-bin:
$(E) ""
$(E) "Stage 1 (FAT32)"
$(E) "==============="
$(Q)$(MAKE) -C $(STAGE1DIR) bin-fat32
$(STAGE2_BIN): stage2-bin ;
stage2-bin:
$(E) ""
$(E) "Stage 2"
$(E) "======="
$(Q)$(MAKE) -C $(STAGE2DIR) bin
# }}}