-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (34 loc) · 1.09 KB
/
Makefile
File metadata and controls
48 lines (34 loc) · 1.09 KB
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
#
# 'make' build executable file 'mycc'
# 'make clean' removes all .o and executable files
#
TARGET=i386-elf
# define the C compiler to use
M4 = @echo " M4 " $< ; m4
GAS = @echo " GAS " $< ; $(TARGET)-gcc
NASM = @echo " NASM " $< ; nasm
CC = @echo " CC " $< ; $(TARGET)-gcc
CDEP = @$(TARGET)-gcc
CX = @echo " CXX " $< ; $(TARGET)-gxx
LD = @echo " LD " $@ ; $(TARGET)-gcc
RM = @rm -f
# define the program name and path
PROGNAME=vmpxx
PROGPATH=/boot/vmpxx
# define any compile-time flags
CFLAGS=-Wall -g -ffreestanding
NASMFLAGS = -felf -g
# define any link-time flags
LFLAGS = -ffreestanding -O2 -nostdlib -static-libgcc -g
INCLUDES= -iquoteinclude -iquote$(BUILDDIR) -iquote.
config: $(BUILDDIR)opt_make $(BUILDDIR)_opt_cfg.h
$(BUILDDIR)opt_make: script/opt_make.m4 config/opts.list
$(M4) -I . script/opt_make.m4 > $(BUILDDIR)opt_make
$(BUILDDIR)_opt_cfg.h: script/opt_cfg.m4 config/opts.list
$(M4) -I . script/opt_cfg.m4 > ${BUILDDIR}_opt_cfg.h
-include $(BUILDDIR)opt_make
clean: cleanconfig
cleanconfig:
$(RM) $(BUILDDIR)opt_make
$(RM) $(BUILDDIR)_opt_cfg.h
.PHONY: config clean