📄 makefile.common
字号:
## ----------------------------------------------------------------------# T-Kernel / Standard Extension## Copyright (C) 2006 by Ken Sakamura. All rights reserved.# T-Kernel / Standard Extension is distributed # under the T-License for T-Kernel / Standard Extension.# ----------------------------------------------------------------------## Version: 1.00.00# Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11.## ----------------------------------------------------------------------### Makefile for gmake# solib (common description)## source file dependencies (generated automatically)DEPS = DependenciesDEPENDENCIES_OUTPUT := $(DEPS)# ----------------------------------------------------------------------------# target fileTARGET = solib.o# source pathS = ../../srcHEADER_TKSE = $(BD)/tkse/include $(BD)/include/tkseVPATH = $(S)/sysdepend/$(MACHINE):$(S)HEADER := $(S)/sysdepend/$(MACHINE) $(S) $(HEADER_TKSE) $(HEADER)# source filesSRC = soinit.c dlinfo.c load.c resolve.c somalloc.c \ $(SRC_SYSDEP)OBJ = $(addsuffix .o, $(basename $(SRC)))SRC.C = $(filter %.C, $(SRC))# perl script for checking the undefined symbol# Excepting the symbol defined by linker and the symbol of "weak" attribute,# link shall be made so that there is no-undefined symbol.define chksolib $$exist = 0; while ( <> ) { next if /^ U _DYNAMIC$$/; next if /^ U _GLOBAL_OFFSET_TABLE_$$/; next if /^ U _start$$/; next if /^ U _end$$/; next if /^ U _gp_disp$$/; print; if ( /^ U/ ) { print STDERR; $$exist = 1; } } exit($$exist);endef# link libraryLDLIBS = -ltkse -ltcstr -lg -ltm -ltksesvc -lsvc \ $(LDLIBS_SYSDEP)# System call interface library needed at "crttkse.o" shall be# linked to "solib" before loading the shared librarySVCIF = tkse_DefMsgHdr tkse_rcv_msg# ----------------------------------------------------------------------------.PHONY: all clean install importALL = $(TARGET) $(TARGET:%.o=%.map)all: $(ALL)$(TARGET): $(OBJ) $(LINK_R.o) -static $(SVCIF:%=-u %) $^ $(LDLIBS) $(OUTPUT_OPTION)$(TARGET:%.o=%.map): $(TARGET) $(NM) $(NMFLAGS) $< | $(PERL) -e "$$chksolib" > $@import: cd $(S); $(RM) \#so.h; $(BD)/etc/mkimport so.hclean: $(RM) $(OBJ) $(SRC.C:%.C=%.c) $(ALL) $(DEPS)install: $(TARGET:%=$(LIB_INSTALLDIR)/%)# generate dependenciesifdef DEPENDENCIES_OUTPUT $(DEPS): ; touch $(DEPS)else $(DEPS): $(SRC) ; $(MAKEDEPS) $@ $?endifinclude $(DEPS)$(SRC.C:%.C=%.c):
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -