Makefile (829B)
1 .POSIX: 2 PROJECTDIR = ../../../.. 3 include $(PROJECTDIR)/scripts/rules.mk 4 5 FLAGS = $(PROJ_LDFLAGS) $(LINKSCRIPT) 6 7 COMMON_OBJS =\ 8 trap.o\ 9 ecstr.o\ 10 main.o\ 11 arch.o\ 12 debug_lock.o\ 13 sysreg.o\ 14 ctx.o\ 15 crt.o\ 16 fpu.o\ 17 mmu.o\ 18 gic.o\ 19 $(SRCDIR)/os9/builtin.o \ 20 21 9FVP_OBJS =\ 22 $(COMMON_OBJS)\ 23 fvp.o\ 24 fvpasm.o\ 25 26 9RPI3_OBJS =\ 27 $(COMMON_OBJS)\ 28 pi3.o\ 29 pi3asm.o\ 30 31 TARGET = $(BINDIR)/$(OS9).bin 32 33 all: $(TARGET) 34 35 ecstr.c: ec.h 36 ./mkecstr ec.h 37 38 $(COMMON_OBJS): sysreg.h 39 40 sysreg.h: sysreg.lst 41 ./mksysreg -h sysreg.lst 42 43 sysreg.s: sysreg.lst 44 ./mksysreg -s sysreg.lst 45 46 $(BINDIR)/9fvp.elf: $(9FVP_OBJS) $(LIBDEP) 47 $(LD) $(FLAGS) $(9FVP_OBJS) -lk -lc $(PROJ_LDLIBS) -o $@ 48 49 $(BINDIR)/9pi3.elf: $(9RPI3_OBJS) $(LIBDEP) 50 $(LD) $(FLAGS) $(9RPI3_OBJS) -lk -lc $(PROJ_LDLIBS) -o $@ 51 52 clean: 53 rm -f ecstr.c 54 rm -f $(TARGET) 55 rm -f sysreg.h sysreg.s