makefile.common

来自「T-kernel 的extension源代码」· COMMON 代码 · 共 105 行

COMMON
105
字号
## ----------------------------------------------------------------------#     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 (libdl) #		For GNU make##	DLL support library##	"make" method #	"make":#		Create the formal version for release#	"make mode=debug":#		Create it for debug.#	"make clean":#		Delete the all files created at "make" #	"make install":#		Install it at the specific location## Library versionLIB_VERSION = 2# Source-dependency file (Auto-generation)DEPS = DependenciesDEPENDENCIES_OUTPUT := $(DEPS)# ----------------------------------------------------------------------------# Creation targetTARGET_BASE = libdlTARGET.a = $(TARGET_BASE).aTARGET.so = $(TARGET_BASE).so.$(LIB_VERSION)# Search path of source fileS = ../../srcVPATH = $SHEADER_TKSE = $(BD)/tkse/include $(BD)/include/tkseHEADER += $(HEADER_TKSE) $(S)/sysdepend/$(TETYPE)_$(MACHINE) $(S)# Source fileSRC = search.c load.c symbol.c addrinfo.cOBJ	= $(addsuffix .o, $(basename $(SRC)))SRC.C	= $(filter %.C, $(SRC))# Additional optionCFLAGS += -fomit-frame-pointer# ----------------------------------------------------------------------------.PHONY: all clean installifeq ($(LIBTYPE), so)  EXE_INST = $(TARGET.so) $(TARGET.so).map  ALL      = $(EXE_INST) $(TARGET.a)else  ALL = $(TARGET.a)endifall: $(ALL)$(TARGET.a): $(OBJ)	$(AR) $(ARFLAGS) $@ $?  ifdef RANLIB	$(RANLIB) $@  endif$(TARGET.so): $(OBJ)	$(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION)import:	cd $(S); $(RM) \#libdl.h; $(BD)/etc/mkimport libdl.hclean:	$(RM) $(OBJ) $(SRC.C:%.C=%.c) $(ALL) $(DEPS)install: $(addprefix $(LIB_INSTALLDIR)/, $(ALL))ifeq ($(LIBTYPE), so)install: $(addprefix $(EXE_INSTALLDIR)/, $(EXE_INST))endif# Source-dependency ifdef DEPENDENCIES_OUTPUT  $(DEPS): ; touch $(DEPS)else  $(DEPS): $(SRC) ; $(MAKEDEPS) $@ $?endifinclude $(DEPS)$(SRC.C:%.C=%.c):

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?