1: #
2: # ----------------------------------------------------------------------
3: # T-Kernel 2.0 Software Package
4: #
5: # Copyright 2011 by Ken Sakamura.
6: # This software is distributed under the latest version of T-License 2.x.
7: # ----------------------------------------------------------------------
8: #
9: # Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
10: # Modified by T-Engine Forum at 2013/03/14.
11: # Modified by TRON Forum(http://www.tron.org/) at 2015/06/04.
12: #
13: # ----------------------------------------------------------------------
14: #
15:
16: #
17: # Makefile for gmake
18: # sysinit (common description)
19: #
20:
21: # source file dependencies (generated automatically)
22: DEPS = Dependencies
23: DEPENDENCIES_OUTPUT := $(DEPS)
24:
25: # ----------------------------------------------------------------------------
26:
27: # target object
28: TARGET = sysinit.o
29:
30: # t2ex source file path
31: S = ../../src_t2ex
32:
33: # original tk2 source file path
34: S_TK2 = ../../src
35:
36: # common source files
37: SRC += sysinit_main.c sysstartup.c gdevcnf.c gsyscnf.c \
38: patch.c inittask_def.c
39: VPATH += $(S) $(S_TK2)
40: HEADER += $(S) $(S_TK2)
41:
42: # additional source files (cpu dependent)
43: VPATH += ../../../sysdepend_t2ex/cpu/$(MACHINE) ../../../sysdepend/cpu/$(MACHINE)
44: HEADER += ../../../sysdepend_t2ex/cpu/$(MACHINE) ../../../sysdepend/cpu/$(MACHINE)
45:
46: # additional source files (device dependent)
47: VPATH += ../../../sysdepend_t2ex/device/$(TETYPE)_$(MACHINE) ../../../sysdepend/device/$(TETYPE)_$(MACHINE)
48: HEADER += ../../../sysdepend_t2ex/device/$(TETYPE)_$(MACHINE) ../../../sysdepend/device/$(TETYPE)_$(MACHINE)
49:
50: # additional source files (inittask_dev.c)
51: VPATH += ../../../sysmain/src
52:
53: # header file path (kernel settings)
54: HEADER += ../../../tkernel/src_t2ex ../../../tkernel/src
55:
56: OBJ = $(addsuffix .o, $(basename $(SRC)))
57:
58: # compiler options
59: CFLAGS += $(CFLAGS_WARNING)
60:
61: # ----------------------------------------------------------------------------
62:
63: .PHONY: all clean
64:
65: ALL = $(TARGET) $(CRT0)
66:
67: all: $(ALL)
68:
69: $(TARGET): $(OBJ)
70: $(LINK_R.o) $^ $(OUTPUT_OPTION)
71:
72: clean:
73: $(RM) $(OBJ) $(ALL) $(DEPS)
74:
75: # generate dependencies
76: $(DEPS): ; touch $(DEPS)
77: -include $(DEPS)