Makefile (441B)
1 .POSIX: 2 PROJECTDIR=../.. 3 4 DIRS =\ 5 arch\ 6 dev\ 7 hosted\ 8 9 include $(PROJECTDIR)/scripts/rules.mk 10 11 OBJS =\ 12 alloc.o\ 13 dlang.o\ 14 map.o\ 15 proc.o\ 16 ref.o\ 17 syscall.o\ 18 sys.o\ 19 dev/builtin.o\ 20 21 all: image 22 23 version.h: FORCE 24 ./mkver 25 26 sys.o: version.h 27 28 image: builtin.o FORCE 29 +test $(MODE) = hosted && cd hosted || cd arch && $(MAKE) 30 31 builtin.o: $(OBJS) 32 $(LD) $(PROJ_LDFLAGS) -r -o $@ $(OBJS) 33 34 dev/builtin.o: dev 35 touch $@ 36 37 clean: 38 rm -f version.h