4 KNAME
= And we have a coacervate...
7 HOSTCFLAGS
= -Wall
-Wstrict-prototypes
-O2
-fomit-frame-pointer
9 CROSS_COMPILE ?
= arm-linux-
13 AS
= $(CROSS_COMPILE
)as
14 LD
= $(CROSS_COMPILE
)ld
15 CC
= $(CROSS_COMPILE
)gcc
16 AR
= $(CROSS_COMPILE
)ar
17 NM
= $(CROSS_COMPILE
)nm
18 STRIP
= $(CROSS_COMPILE
)strip
19 OBJCOPY
= $(CROSS_COMPILE
)objcopy
20 OBJDUMP
= $(CROSS_COMPILE
)objdump
22 CFLAGS
= -Wall
-Os
-mcpu
=arm7tdmi
23 INCLUDES
= -Iinclude
-Iinclude
/libc
27 MAKEFLAGS
+= --no-print-directory
29 all-sources
= $(shell git-ls-files
)
31 export ARCH AS LD CC AR NM STRIP OBJCOPY OBJDUMP AWK CFLAGS PYTHON INCLUDES
33 tinyx.dirs
= lib
/ arch
/ kernel
/
35 tinyx.objs
= $(patsubst %/, %/tyx_part.o
, $(tinyx.dirs
))
37 $(shell rm -f
$(tinyx.objs
) include/asm
)
38 $(shell ln
-s asm-
$(ARCH
) include/asm
)
47 @touch build
/tinyx.deps
52 $(OBJCOPY
) -O ihex build
/$< build
/$@
54 tinyx.elf
: $(tinyx.objs
)
55 $(LD
) -EL
-T arch
/$(ARCH
)/kernel
/kernel.
ld -o build
/$@
$(tinyx.objs
)
58 @
$(MAKE
) target
=$@
-f scripts
/Makefile.build
61 ctags
-a
$(all-sources
)
69 @cleandirs
="$(shell $(PYTHON) scripts/expandtree.py $(tinyx.dirs))"; \
71 for
dir in
$$cleandirs; do \
72 cleanobjs
="$$cleanobjs $$dir*.o"; \
74 echo
"rm -f $$cleanobjs include/asm build/tinyx.hex build/tinyx.elf build/tinyx.deps"; \
75 rm -f
$$cleanobjs include/asm build
/tinyx.hex build
/tinyx.elf build
/tinyx.deps
;