forked from fedetft/miosix-kernel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (40 loc) · 1022 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
44
45
46
47
48
49
50
##
## Makefile for Miosix embedded OS
##
## Path to kernel/config directories (edited by init_project_out_of_git_repo.pl)
KPATH := miosix
CONFPATH := $(KPATH)
MAKEFILE_VERSION := 1.15
include $(KPATH)/Makefile.kcommon
##
## List here your source files (both .s, .c and .cpp)
##
SRC := main.cpp
##
## List here additional include directories (in the form -Iinclude_dir)
##
INCLUDE_DIRS :=
##
## List here additional static libraries with relative path
##
LIBS :=
##
## List here subdirectories which contains makefiles
##
SUBDIRS +=
##
## Attach a romfs filesystem image after the kernel
##
ROMFS_DIR :=
all: $(if $(ROMFS_DIR), image, main)
main: $(OBJ) all-recursive
$(ECHO) "[LD ] main.elf"
$(Q)$(CXX) $(LFLAGS) -o main.elf $(OBJ) $(LINK_LIBS)
$(ECHO) "[CP ] main.hex"
$(Q)$(CP) -O ihex main.elf main.hex
$(ECHO) "[CP ] main.bin"
$(Q)$(CP) -O binary main.elf main.bin
$(Q)$(SZ) main.elf
clean: clean-recursive
$(Q)rm -f $(OBJ) $(OBJ:.o=.d) main.elf main.hex main.bin main.map
-include $(OBJ:.o=.d)