source: branches/reyalp-flt/core/modules/Makefile @ 1517

Revision 1517, 5.2 KB checked in by tsv, 2 years ago (diff)
  • Improved startup stability (run module_menu on first menu popup instead of runing in startup sequence)
  • Added stoplist (unsafe symbols) to elf2flt. give no chance to make unobvious mistake
Line 
1topdir=../../
2
3SKIPBUILDRULES=1
4
5include $(topdir)makefile.inc
6
7OBJ_ISDIGIT=
8ifeq ($(GCC_VERSION_MAJOR),3)
9    OBJ_ISDIGIT+= $(topdir)lib/libc/issmth.o
10endif
11
12
13CFLAGS+=$(CTHUMB) -mlong-calls
14# warning: library order matters!
15LDLIBS= -lgcc
16LDOPTS=-nostdlib -Wl,--allow-shlib-undefined -Wl,-T,$(topdir)tools/link-boot.ld
17LDOPTS+=-Wl,-N,-Ttext,0x0016ee30 -r -Wl,-d
18
19OBJS=../gui_calendar.o ../gui_bench.o ../gui_4wins.o ../gui_mastermind.o ../gui_reversi.o \
20         ../gui_sokoban.o ../gui_read.o ../gui_debug.o  ../gui_tetris.o ../gui_snake.o ../dng.o
21
22
23CFLAGS+=-DOPT_GENERIC_MODULES
24OPT_OBJS= ../gui_fselect.o ../nothumb.o ../gui_mpopup.o ../curves.o ../edgeoverlay.o ../gui_palette.o
25OPT_FLT= fselect.flt edgeovr.flt curves.flt mpopup.flt palette.flt
26
27
28all: exportlist ../flt.h \
29                _dng.flt benchm.flt calend.flt 4wins.flt mastmind.flt reversi.flt sokoban.flt _rawop10.flt _rawop12.flt \
30                txtread.flt memview.flt modinsp.flt tetris.flt snake.flt modmenu.flt $(OPT_FLT)
31
32%.o: %.c
33        @echo $< \-\> $@
34        $(CC) $(CFLAGS) -nostdinc -c -o $@ $<
35
36.dep/%.d: %.c .dep
37        $(HOSTCC) $(HOSTCFLAGS) -MM $< > $@.$$$$; \
38            sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
39            rm -f $@.$$$$
40
41%.flt: %.elf
42        @echo \-\> $@
43#       arm-elf-objdump.exe -d -r -x $< >$<.dumpobj
44#       $(topdir)/tools/elf2flt/elf2flt$(EXE) $< $@ -e -f -h -r -s -iexportlist.txt >$@.dump
45        $(topdir)/tools/elf2flt/elf2flt$(EXE) $< $@ -iexportlist.txt -!$(topdir)/tools/elf2flt/stoplist.txt > $(DEVNULL)
46
47calend.elf: simple_module.o ../gui_calendar.o
48        @echo \-\> $@
49        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
50
51benchm.elf: simple_module.o ../gui_bench.o
52        @echo \-\> $@
53        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
54
554wins.elf: simple_game.o ../gui_4wins.o
56        @echo \-\> $@
57        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
58
59mastmind.elf: simple_game.o ../gui_mastermind.o
60        @echo \-\> $@
61        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
62
63reversi.elf: simple_game.o ../gui_reversi.o
64        @echo \-\> $@
65        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
66
67tetris.elf: ../gui_tetris.o
68        @echo \-\> $@
69        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
70
71snake.elf: ../gui_snake.o
72        @echo \-\> $@
73        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
74
75sokoban.elf: ../gui_sokoban.o
76        @echo \-\> $@
77        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
78
79memview.elf:  ../gui_debug.o
80        @echo \-\> $@
81        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
82
83palette.elf:  ../gui_palette.o
84        @echo \-\> $@
85        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
86
87mpopup.elf:  ../gui_mpopup.o
88        @echo \-\> $@
89        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
90
91txtread.elf: ../gui_read.o
92        @echo \-\> $@
93        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
94
95edgeovr.elf: ../edgeoverlay.o $(OBJ_ISDIGIT)
96        @echo \-\> $@
97        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
98
99curves.elf: ../curves.o
100        @echo \-\> $@
101        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
102
103modinsp.elf: module_inspector.o
104        @echo \-\> $@
105        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
106
107modmenu.elf: module_menu.o ../nothumb.o
108        @echo \-\> $@
109        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
110
111_dng.elf: ../dng.o $(topdir)/lib/armutil/reversebytes.o
112        @echo \-\> $@
113        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
114
115_rawop10.elf: raw_merge10.o
116        @echo \-\> $@
117        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
118
119_rawop12.elf: raw_merge12.o
120        @echo \-\> $@
121        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
122
123raw_merge10.o: ../raw_merge.c
124        @echo $< \-\> $@
125        $(CC) $(CFLAGS) -nostdinc -c -DCAM_MODULE_SENSOR_BITS_PER_PIXEL=10 -o $@ $<
126
127raw_merge12.o: ../raw_merge.c
128        @echo $< \-\> $@
129        $(CC) $(CFLAGS) -nostdinc -c -DCAM_MODULE_SENSOR_BITS_PER_PIXEL=12 -o $@ $<
130
131#lua.elf: lib_edgeoverlay.o ../luascript.o $(topdir)lib/lua/liblua.a
132#       @echo \-\> $@
133#       $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
134
135fselect.elf: ../gui_fselect.o ../nothumb.o
136        @echo \-\> $@
137        $(CC) $(CFLAGS) -o $@ -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group $(LDFLAGS) $(LDOPTS)
138
139../nothumb.o: ../nothumb.c
140        @echo $< \-\> $@
141        $(CC) $(CFLAGS) -marm -nostdinc -c -o $@ $<
142
143clean:
144        rm -f *.o *.elf.syms *.elf *.flt $(OBJS) $(OPT_OBJS)
145
146distclean: clean
147#       rm -f *.flt
148
149exportlist:  ../module_exportlist.c
150        @echo $< \-\> $@
151        $(topdir)tools/makeexport$(EXE) ../module_exportlist.c ../module_exportlist.h exportlist.txt
152
153../flt.h: $(topdir)tools/elf2flt/flt.h
154        @echo $< \-\> $@
155        @echo "//DO NOT EDIT THIS FILE. This is automatic copy of tools/elf2flt/flt.h" > ../flt.h
156        cat $(topdir)tools/elf2flt/flt.h >>../flt.h
157
158include $(topdir)bottom.inc
Note: See TracBrowser for help on using the repository browser.