- Timestamp:
- 07/02/2017 12:06:10 AM (7 years ago)
- Branches:
- master
- Children:
- f394e7b
- Parents:
- c091ef8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rc091ef8 r6dc5ea7 6 6 CROSS_AS := $(CROSS_PRE)-as 7 7 CROSS_AR := $(CROSS_PRE)-ar 8 CROSS_OBJC := $(CROSS_PRE)-objcopy 8 9 9 10 # -mshort sets the size of an int to 16 bits; important for interop with … … 12 13 FLAGS := -Os -m68000 -Wall -Wextra 13 14 14 FLAGS_COM := $(FLAGS) -mshort -std=c99 -f freestanding -nostdinc\15 - fno-strict-aliasing -fno-inline -fno-omit-frame-pointer \15 FLAGS_COM := $(FLAGS) -mshort -std=c99 -fleading-underscore -ffreestanding \ 16 -nostdinc -fno-strict-aliasing -fno-inline -fno-omit-frame-pointer \ 16 17 -Wpedantic -Wcast-align -Wcast-qual -Wconversion -Wsign-conversion \ 17 18 -Wshadow -Wmissing-declarations -Wredundant-decls \ … … 30 31 PROLOG_CO := $(PROLOG_C:.c=.o) 31 32 PROLOG_SO := $(PROLOG_S:.s=.o) 32 33 PROLOG_SRC := $(PROLOG_C:%=prolog/%) $(PROLOG_S:%=prolog/%)34 33 PROLOG_OBJ := $(PROLOG_CO:%=build/%) $(PROLOG_SO:%=build/%) 35 34 36 35 build/%.o: prolog/%.c $(HEADERS) | build 37 36 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 37 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 38 38 39 39 build/%.o: prolog/%.s $(HEADERS) | build … … 49 49 IOLIB_CO := $(IOLIB_C:.c=.o) 50 50 IOLIB_SO := $(IOLIB_S:.s=.o) 51 52 IOLIB_SRC := $(IOLIB_C:%=iolib/%) $(IOLIB_S:%=iolib/%)53 51 IOLIB_OBJ := $(IOLIB_CO:%=build/%) $(IOLIB_SO:%=build/%) 54 52 55 53 build/%.o: iolib/%.c $(HEADERS) | build 56 54 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 55 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 57 56 58 57 build/%.o: iolib/%.s $(HEADERS) | build … … 74 73 LIBCIO_CO := $(LIBCIO_C:.c=.o) 75 74 LIBCIO_SO := $(LIBCIO_S:.s=.o) 76 77 LIBCIO_SRC := $(LIBCIO_C:%=libcio/%) $(LIBCIO_S:%=libcio/%)78 75 LIBCIO_OBJ := $(LIBCIO_CO:%=build/%) $(LIBCIO_SO:%=build/%) 79 76 80 77 build/%.o: libcio/%.c $(HEADERS) | build 81 78 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 79 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 82 80 83 81 build/%.o: libcio/%.s $(HEADERS) | build … … 95 93 96 94 LIBSM_CO := $(LIBSM_C:.c=.o) 97 98 LIBSM_SRC := $(LIBSM_C:%=libsm/%)99 95 LIBSM_OBJ := $(LIBSM_CO:%=build/%) 100 96 101 97 build/%.o: libsm/%.c $(HEADERS) | build 102 98 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 99 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 103 100 104 101 libsm.a: $(LIBSM_OBJ) … … 113 110 LIB700_CO := $(LIB700_C:.c=.o) 114 111 LIB700_SO := $(LIB700_S:.s=.o) 115 116 LIB700_SRC := $(LIB700_C:%=lib700/%) $(LIB700_S:%=lib700/%)117 112 LIB700_OBJ := $(LIB700_CO:%=build/%) $(LIB700_SO:%=build/%) 118 113 119 114 build/%.o: lib700/%.c $(HEADERS) | build 120 115 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 116 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 121 117 122 118 build/%.o: lib700/%.s $(HEADERS) | build … … 137 133 VLIB_CO := $(VLIB_C:.c=.o) 138 134 VLIB_SO := $(VLIB_S:.s=.o) 139 140 VLIB_SRC := $(VLIB_C:%=vlib/%) $(VLIB_S:%=vlib/%)141 135 VLIB_OBJ := $(VLIB_CO:%=build/%) $(VLIB_SO:%=build/%) 142 136 143 137 build/%.o: vlib/%.c $(HEADERS) | build 144 138 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 139 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 145 140 146 141 build/%.o: vlib/%.s $(HEADERS) | build … … 152 147 153 148 ROM_C := booter.c romp.c 154 ROM_S := bios.s lowram.stimeint.s149 ROM_S := bios.s timeint.s 155 150 156 151 ROM_CO := $(ROM_C:.c=.o) 157 152 ROM_SO := $(ROM_S:.s=.o) 158 159 ROM_SRC := $(ROM_C:%=rom/%) $(ROM_S:%=rom/%)160 153 ROM_OBJ := $(ROM_CO:%=build/%) $(ROM_SO:%=build/%) 161 154 155 LOWRAM_S := lowram.s 156 157 LOWRAM_SO := $(LOWRAM_S:.s=.o) 158 LOWRAM_OBJ := $(LOWRAM_SO:%=build/%) 159 162 160 build/%.o: rom/%.c $(HEADERS) | build 163 161 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 162 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 164 163 165 164 build/%.o: rom/%.s $(HEADERS) | build 166 165 $(CROSS_GCC) $(FLAGS_ASM) -c -o $@ $< 167 166 168 rom.abs: prolog.a iolib.a libcio.a libsm.a lib700.a vlib.a $(ROM_OBJ) 169 $(CROSS_GCC) $(FLAGS_LNK) -o rom.abs $(ROM_OBJ) \ 170 prolog.a libcio.a vlib.a iolib.a libsm.a lib700.a 167 rom.abs: $(ROM_OBJ) \ 168 prolog.a iolib.a libcio.a libsm.a lib700.a vlib.a 169 $(CROSS_GCC) $(FLAGS_LNK) -Wl,--script misc/rom.ld -o rom.abs \ 170 $(ROM_OBJ) \ 171 prolog.a libcio.a vlib.a iolib.a libsm.a lib700.a -lgcc 171 172 172 173 RAM_C := addfpu.c adfield.c adselbx.c asgdsp.c asgvce.c barbadj.c chgsef.c \ … … 194 195 RAM_CO := $(RAM_C:.c=.o) 195 196 RAM_SO := $(RAM_S:.s=.o) 196 197 RAM_SRC := $(RAM_C:%=rom/%) $(RAM_S:%=rom/%)198 197 RAM_OBJ := $(RAM_CO:%=build/%) $(RAM_SO:%=build/%) 199 198 200 199 build/%.o: ram/%.c $(HEADERS) | build 201 200 $(CROSS_GCC) $(FLAGS_COM) -c -o $@ $< 201 $(CROSS_OBJC) --redefine-syms misc/rewrite.txt $@ 202 202 203 203 build/%.o: ram/%.s $(HEADERS) | build 204 204 $(CROSS_GCC) $(FLAGS_ASM) -c -o $@ $< 205 205 206 midas.abs: prolog.a iolib.a libcio.a libsm.a lib700.a vlib.a $(RAM_OBJ) 207 $(CROSS_GCC) $(FLAGS_LNK) -o midas.abs $(RAM_OBJ) \ 208 prolog.a libcio.a vlib.a iolib.a libsm.a lib700.a 206 midas.abs: $(LOWRAM_OBJ) prolog.a $(RAM_OBJ) \ 207 iolib.a libcio.a libsm.a lib700.a vlib.a 208 $(CROSS_GCC) $(FLAGS_LNK) -Wl,--script misc/ram.ld -o midas.abs \ 209 $(LOWRAM_OBJ) prolog.a $(RAM_OBJ) \ 210 libcio.a vlib.a iolib.a libsm.a lib700.a -lgcc 209 211 210 212 build:
Note:
See TracChangeset
for help on using the changeset viewer.