Root/
Source at commit 12bfb32 created 13 years 10 months ago. By Bas Wijnen, make things work with unfinished new startup procedure | |
---|---|
1 | # Iris: micro-kernel for a capability-based operating system. |
2 | # Makefile: build rules |
3 | # Copyright 2009 Bas Wijnen <wijnen@debian.org> |
4 | # |
5 | # This program is free software: you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by |
7 | # the Free Software Foundation, either version 3 of the License, or |
8 | # (at your option) any later version. |
9 | # |
10 | # This program is distributed in the hope that it will be useful, |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | # GNU General Public License for more details. |
14 | # |
15 | # You should have received a copy of the GNU General Public License |
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | |
18 | # Define some variables. |
19 | SERIAL = /dev/ttyUSB0 |
20 | CXXFLAGS = -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -nostdinc $(ARCH_CXXFLAGS) -ggdb3 |
21 | CPPFLAGS = -O5 -fno-inline $(ARCH_CPPFLAGS) |
22 | CC = $(CROSS)gcc |
23 | LD = $(CROSS)ld |
24 | OBJCOPY = $(CROSS)objcopy |
25 | |
26 | headers = kernel.hh iris.hh $(arch_headers) |
27 | iris_sources = panic.cc data.cc alloc.cc memory.cc invoke.cc schedule.cc $(arch_iris_sources) |
28 | BUILT_SOURCES = $(iris_sources) $(boot_sources) |
29 | |
30 | # Include arch-specific rules. |
31 | include Makefile.arch |
32 | |
33 | # Disable implicit rules. |
34 | %.o: %.S |
35 | %.o: %.cc |
36 | |
37 | PYPP = /usr/bin/pypp |
38 | %.cc: %.ccp |
39 | $(PYPP) --name $< < $< > $@ |
40 | %.hh: %.hhp |
41 | $(PYPP) --name $< < $< > $@ |
42 | |
43 | %.o:%.cc Makefile Makefile.arch $(headers) |
44 | $(CC) $(CPPFLAGS) $(TARGET_FLAGS) $(CXXFLAGS) -c $< -o $@ |
45 | |
46 | %.elf: boot-programs/crt0.o boot-programs/%.o |
47 | $(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ |
48 | $(OBJCOPY) -S $(OBJCOPYFLAGS) $@ |
49 | |
50 | fs/%.elf: source/crt0.o source/%.o |
51 | $(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ |
52 | $(OBJCOPY) -S $(OBJCOPYFLAGS) $@ |
53 | |
54 | fs/%: % |
55 | ln -s ../$< $@ |
56 | |
57 | clean: |
58 | rm -f *.o boot-programs/*.o $(BUILT_SOURCES) $(ARCH_CLEAN_FILES) |
59 | |
60 | debug: |
61 | stty -F $(SERIAL) raw 9600 |
62 | cat $(SERIAL) |
63 | |
64 | .PHONY: clean |
65 | .PRECIOUS: iris.hh kernel.hh boot-programs/crt0.o |
66 |
Branches:
master