1 # ----------------------------------------------------------------------------
2 # Hyper Operating System V4 Advance
4 # Copyright (C) 1998-2008 by Project HOS
5 # http://sourceforge.jp/projects/hos/
6 # ----------------------------------------------------------------------------
13 OS_DIR = ..\..\..\..\..
14 KERNEL_DIR = $(OS_DIR)\kernel
15 KERNEL_CFGRTR_DIR = $(OS_DIR)\cfgrtr\build\msc
16 KERNEL_MAKINC_DIR = $(KERNEL_DIR)\build\common\nmake
17 KERNEL_BUILD_DIR = $(KERNEL_DIR)\build\mn103\mn103s\cc103
18 HOSAPLFW_DIR = $(OS_DIR)\aplfw
19 HOSAPLFW_INC_DIR = $(HOSAPLFW_DIR)
20 HOSAPLFW_BUILD_DIR = $(HOSAPLFW_DIR)\build\mn103\mn103s\cc103
21 OBJS_DIR = objs_$(TARGET)
25 !include $(KERNEL_MAKINC_DIR)\common.inc
29 KERNEL_CFGRTR = $(KERNEL_CFGRTR_DIR)\h4acfg-mn103s
33 HOSAPLFW_LIB = $(HOSAPLFW_BUILD_DIR)\hosaplfw.l
37 !if "$(DEBUG)" == "Yes"
39 HOSAPLFW_LIB = $(HOSAPLFW_BUILD_DIR)\hosaplfwdbg.l
47 LNFLAGS = $(LNFLAGS) -g -Qld=-m -Qld=-Rl -Qld=-T@CODE=0x40000000 -Qld=-T@DATA=0x00000004
51 TARGET_EXE = $(TARGET).$(EXT_EXE)
52 TARGET_BIN = $(TARGET).$(EXT_BIN)
56 !include $(KERNEL_MAKINC_DIR)\cc103_d.inc
60 INC_DIRS = $(INC_DIRS) $(HOSAPLFW_INC_DIR)
64 SRC_DIRS = $(SRC_DIRS) . ..
68 ASRCS = $(ASRCS) .\startup.as
72 CSRCS = $(CSRCS) ..\kernel_cfg.c
73 CSRCS = $(CSRCS) ..\main.c
74 CSRCS = $(CSRCS) ..\boot.c
75 CSRCS = $(CSRCS) ..\ostimer.c
79 OBJS = $(OBJS) $(OBJS_DIR)\kernel_cfg.ro
80 OBJS = $(OBJS) $(OBJS_DIR)\main.ro
81 OBJS = $(OBJS) $(OBJS_DIR)\boot.ro
82 OBJS = $(OBJS) $(OBJS_DIR)\ostimer.ro
86 LIBS = $(LIBS) $(HOSAPLFW_LIB)
90 # --------------------------------------
92 # --------------------------------------
94 all: make_subproject makeexe_all $(OBJS_DIR)\kernel_cfg.c srcobjcp $(TARGET_EXE)
97 $(CMD_CD) $(HOSAPLFW_BUILD_DIR)
102 -$(CMD_RM) $(TARGET_EXE) $(TARGET_EXE) $(OBJS) ..\kernel_cfg.c ..\kernel_id.h
104 mostlyclean: clean kernel_clean
105 $(CMD_CD) $(HOSAPLFW_BUILD_DIR)
106 $(MAKE) -f nmake.mak clean
110 ..\kernel_cfg.c ..\kernel_id.h: ..\system.cfg
111 cl /E ..\system.cfg > ..\system.i
112 $(KERNEL_CFGRTR) ..\system.i -c ..\kernel_cfg.c -i ..\kernel_id.h
114 $(OBJS_DIR)\kernel_cfg.c: ..\kernel_cfg.c
115 $(CMD_CP) ..\kernel_cfg.c $(OBJS_DIR)
116 $(CMD_CP) ..\kernel_id.h $(OBJS_DIR)
120 !include $(KERNEL_MAKINC_DIR)\makeexe.inc
122 # %jp{コンパイラ依存のルール定義読込み}
123 !include $(KERNEL_MAKINC_DIR)\cc103_r.inc
129 $(CMD_CP) ..\*.* $(OBJS_DIR)
133 # --------------------------------------
135 # --------------------------------------
137 $(OBJS_DIR)\kernel_cfg.ro : $(OBJS_DIR)\kernel_cfg.c ..\kernel_id.h
138 $(OBJS_DIR)\main.ro : $(OBJS_DIR)\main.c ..\kernel_id.h
139 $(OBJS_DIR)\boot.ro : $(OBJS_DIR)\boot.c ..\kernel_id.h ..\boot.h
140 $(OBJS_DIR)\ostimer.ro : $(OBJS_DIR)\ostimer.c ..\kernel_id.h ..\ostimer.h
141 $(OBJS_DIR)\wintimer.ro : $(OBJS_DIR)\wintimer.c ..\kernel_id.h ..\wintimer.h