📄 makefile.common
字号:
## ----------------------------------------------------------------------# micro T-Kernel## Copyright (C) 2006-2007 by Ken Sakamura. All rights reserved.# micro T-Kernel is distributed under the micro T-License.# ----------------------------------------------------------------------## Version: 1.00.00# Released by T-Engine Forum(http://www.t-engine.org) at 2007/03/26.## ----------------------------------------------------------------------### Makefile for gmake# micro T-Kernel (common description)## source file dependencies (generated automatically)DEPS = DependenciesDEPENDENCIES_OUTPUT := $(DEPS)# ----------------------------------------------------------------------------# target objectTARGET = libtkernel.aS = ../../srcMKFF = $(BD)/etc/mkfuncfiles# common source files (not to be devided)SRC += tkstart.c timer.c klock.c \ tkdev_init.c cpu_init.c cpu_support.S# common source files to be devidedORGSRC += wait.c task.c task_manage.c task_sync.c \ semaphore.c mutex.c eventflag.c \ mailbox.c messagebuf.c rendezvous.c \ mempool.c mempfix.c time_calls.c misc_calls.c \ subsystem.c device.c deviceio.c objname.c \ memory.c# system-dependent source files to be devidedORGSRC_SYSDEPEND += cpu_calls.c# source files for each syscallinclude $(S)/functions.listFUNCSRC = $(addsuffix .c, $(basename $(FUNCTIONS)))SRC += $(FUNCSRC)VPATH += $(S)HEADER += $(S)# additional source files (cpu-dependent)VPATH += ../../../sysdepend/cpu/$(MACHINE)HEADER += ../../../sysdepend/cpu/$(MACHINE)# additional source files (device-dependent)VPATH += ../../../sysdepend/device/$(TETYPE)_$(MACHINE)HEADER += ../../../sysdepend/device/$(TETYPE)_$(MACHINE)# header file path (T-Kernel common standard library)HEADER += ../../../tstdlib# config file path (kernel settings)HEADER += ../../../../config# syscall source filesVPATH += $(S)/funcHEADER += $(S)/func# syscall source files (cpu-dependent)VPATH += ../../../sysdepend/cpu/$(MACHINE)/funcHEADER += ../../../sysdepend/cpu/$(MACHINE)/funcOBJ = $(addsuffix .o, $(basename $(SRC)))OBJ += $(FUNCOBJ)ASM_SRC = $(filter %.S, $(SRC))ASM_OBJ = $(addsuffix .o, $(basename $(ASM_SRC)))# compiler optionsCFLAGS += $(CFLAGS_WARNING)# ----------------------------------------------------------------------------.PHONY: all clean source clean_sourceall: $(TARGET)$(TARGET): $(OBJ) $(AR) $(ARFLAGS) $@ $? ifdef RANLIB $(RANLIB) $@ endifsource: $(ORGSRC) (cd $(S); \ for infile in $(ORGSRC) ; do \ $(MKFF) $$infile ; \ done ); \ (cd ../../../sysdepend/cpu/$(MACHINE) ; \ for infile in $(ORGSRC_SYSDEPEND) ; do \ $(MKFF) $$infile ; \ done );clean: @$(RM) $(OBJ) $(TARGET) $(DEPS)clean_source: (cd $(S)/func ; \ $(RM) *.c ); \ (cd ../../../sysdepend/cpu/$(MACHINE)/func ; \ $(RM) *.c )# generate dependencies$(DEPS): ; touch $(DEPS)include $(DEPS)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -