1: #
2: # ----------------------------------------------------------------------
3: # T2EX Software Package
4: #
5: # Copyright 2012 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 2012/12/12.
10: # Modified by T-Engine Forum at 2013/02/20.
11: # Modified by TRON Forum(http://www.tron.org/) at 2015/06/04.
12: #
13: # ----------------------------------------------------------------------
14: #
15:
16: #
17: # This software package is available for use, modification,
18: # and redistribution in accordance with the terms of the attached
19: # T-License 2.x.
20: # If you want to redistribute the source code, you need to attach
21: # the T-License 2.x document.
22: # There's no obligation to publish the content, and no obligation
23: # to disclose it to the TRON Forum if you have modified the
24: # software package.
25: # You can also distribute the modified source code. In this case,
26: # please register the modification to T-Kernel traceability service.
27: # People can know the history of modifications by the service,
28: # and can be sure that the version you have inherited some
29: # modification of a particular version or not.
30: #
31: # http://trace.tron.org/tk/?lang=en
32: # http://trace.tron.org/tk/?lang=ja
33: #
34: # As per the provisions of the T-License 2.x, TRON Forum ensures that
35: # the portion of the software that is copyrighted by Ken Sakamura or
36: # the TRON Forum does not infringe the copyrights of a third party.
37: # However, it does not make any warranty other than this.
38: # DISCLAIMER: TRON Forum and Ken Sakamura shall not be held
39: # responsible for any consequences or damages caused directly or
40: # indirectly by the use of this software package.
41: #
42: # The source codes in bsd_source.tar.gz in this software package are
43: # derived from NetBSD or OpenBSD and not covered under T-License 2.x.
44: # They need to be changed or redistributed according to the
45: # representation of each source header.
46: #
47:
48: #
49: # Makefile for gmake
50: # T-Kernel/OS (common description)
51: #
52:
53: # source file dependencies (generated automatically)
54: DEPS = Dependencies
55: DEPENDENCIES_OUTPUT := $(DEPS)
56:
57: # ----------------------------------------------------------------------------
58:
59: # target object
60: TARGET = tkernel.o
61:
62: # t2ex source file path
63: S = ../../src_t2ex
64:
65: # original tk2 source file path
66: S_TK2 = ../../src
67:
68: # common source files
69: SRC += tkstart.c timer.c wait.c task.c klock.c \
70: task_manage.c task_sync.c \
71: semaphore.c mutex.c eventflag.c \
72: mailbox.c messagebuf.c rendezvous.c \
73: mempool.c mempfix.c time_calls.c misc_calls.c \
74: subsystem.c objname.c \
75: tkdev_init.c cpu_calls.c cpu_init.c cpu_support.S \
76: version.c
77:
78: VPATH += $(S) $(S_TK2)
79: HEADER += $(S) $(S_TK2)
80:
81: # additional source files (cpu-dependent)
82: VPATH += ../../../sysdepend_t2ex/cpu/$(MACHINE) ../../../sysdepend/cpu/$(MACHINE)
83: HEADER += ../../../sysdepend_t2ex/cpu/$(MACHINE) ../../../sysdepend/cpu/$(MACHINE)
84:
85: # additional source files (device-dependent)
86: VPATH += ../../../sysdepend_t2ex/device/$(TETYPE)_$(MACHINE) ../../../sysdepend/device/$(TETYPE)_$(MACHINE)
87: HEADER += ../../../sysdepend_t2ex/device/$(TETYPE)_$(MACHINE) ../../../sysdepend/device/$(TETYPE)_$(MACHINE)
88:
89: OBJ = $(addsuffix .o, $(basename $(SRC)))
90:
91: ASM_SRC = $(filter %.S, $(SRC))
92: ASM_OBJ = $(addsuffix .o, $(basename $(ASM_SRC)))
93:
94: # compiler options
95: CFLAGS += $(CFLAGS_WARNING)
96:
97: CPPFLAGS += -DTKERNEL_CHECK_CONST
98:
99: # ----------------------------------------------------------------------------
100:
101: .PHONY: all clean
102:
103: all: $(TARGET)
104:
105: $(TARGET): $(OBJ)
106: $(LINK_R.o) $^ $(OUTPUT_OPTION)
107:
108: clean:
109: $(RM) $(OBJ) $(TARGET) $(DEPS)
110:
111: # generate dependencies
112: $(DEPS): ; touch $(DEPS)
113: -include $(DEPS)