⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 嵌入工linux开发的源码
💻
字号:
###############################################################################
# Makefile for library building,written by Yu-Cheng Chang
# Date: Tue 03-06-2001
#
# Desc: 1.To change this makefile to build another library ,
#       those MACROs are need to be modified.
#        LIB_F: the file name of library.
#        OBJS: the object files of library.
#        INCS: include files.
#              (one of those files is modified,all objects are rebuild)
#        SRC_DIR: Directoris of source code.
#                 (each directory is seperated with space)
#        INC_DIR: Directoris of include files.
#                 (each directory is seperated with space)
#        OBJ_DIR: Directory to place object code(one directory ONLY)
#        LIB_DIR: Directory to place library file(one directory ONLY)
#
#       2.Modifing MACROs below is according to your requirement.
#        PRE_SYM: The defined symbols for preprocessor.
###############################################################################
!if $(OS_TYPE) == NT
 S=\\
 REMOVE  = del
 COPY    = copy
 MOVE    = move
!else
 S=/
 REMOVE  = rm -f
 COPY    = cp
 MOVE    = mv
!endif

# Object files
OBJS = \
uiAlarm.o\
uifontex.o\
ui_kernel.o\
uiBitmap.o\
uiButton.o\
uiCalendar.o\
uiCallback.o\
uiCaret.o\
uiControl.o\
uiEng12.o\
uiEng12HT.o\
uiFind_PY.o\
uiGB12.o\
uiBIG12.o\
uiGui_cfg.o\
uiIme_py.o\
uiIme_wb.o\
uiInfo_box.o\
uiKbd_WB.o\
uiKey_hdr.o\
uiLabel.o\
uiListbox.o\
uiMenu.o\
uiPen_hdr.o\
uiPrgMgr_New.o\
uiPrg_mgr.o\
uiProgress.o\
uiRecycle.o\
uiScroll.o\
uiSelector.o\
uiSlider.o\
uiSound.o\
uiStringRC.o\
uiSw_kbd.o\
uiTextEdit.o\
uiTimepanel.o\
uiTimer.o\
uiUserFont.o\
uiUser_Kbd.o\
uiUtility.o\
uiViewport.o\
uiWin_thd.o\
uiWm_Queue.o\
uiWnd.o\
uickbtn.o\
uifont.o\
uigraph.o\
uiicon_img.o\
uikbd_eng.o\
uikbd_engcap.o\
uikbd_hand.o\
uikbd_MkWord.o\
uikbd_py.o\
uikbd_symbol.o\
uihw_mt.o\
uiime_cj.o\
uikbd_cj.o\
uiime_zy.o\
uikbd_zy.o\
#uihw_arti.o\
#uihw_zg.o\
#uiime_lx.o\   
#uikbd_num.o\
#uiSys_Info.o\
#uihw_pp.o\


# Include files
INCS = \
  uigui_cfg.h

# Library name
LIB_F = pdawin.a

GUI_DIR = $(RTOSHOME)kernel$(S)usrlib$(S)pda_win$(S)
PDA_DIR = $(GUI_DIR)src$(S)
APP_DIR = $(GUI_DIR)app$(S)

# Directoris of source code
SRC_DIR = \
  $(PDA_DIR)\
#  $(PDA_DIR)font\
  $(PDA_DIR)ime\
  $(APP_DIR)apviewer\
  $(APP_DIR)filemgr\
  $(APP_DIR)info\
  $(APP_DIR)prgmgr\
  $(APP_DIR)syncmain

# Directory to place object code
OBJ_DIR = $(GUI_DIR)$(TARGET_DIR)$(S)obj$(S)

# Directory to place library file
LIB_DIR = $(RTOSHOME)$(TARGET_DIR)$(S)LIB$(S)

# Directoris of include files
INC_DIR = \
 $(RTOSHOME)kernel/include/\
 $(RTOSHOME)kernel/include/ansi_c\
 $(RTOSHOME)kernel/include/sys/sysvar\
 $(RTOSHOME)kernel/usrlib/file_sys/filesys/include\
 $(RTOSHOME)kernel/usrlib/pda_win/include\
 $(RTOSHOME)driver\
 $(RTOSHOME)driver/include\
 $(RTOSHOME)kernel/usrlib\
 $(RTOSHOME)kernel/usrlib/database/include



# Source code searching path (VPATH is the specify feature of emake)
VPATH = $(SRC_DIR,>;)$(INC_DIR,>;)

# Assign Compiler
CC = $(S_CC)
AS = $(S_AS)
AR = $(S_AR)
ASFLAGS = $(S_ASFLAGS)
CCFLAGS = $(S_CCFLAGS)
CCFLAGS1 = $(CCFLAGS,S/mips16/mips1) 	# For some targets can't build in mips16
!if '$(LONG_CALL)' == 'on'
 CCFLAGS1 += -mlong-calls
!endif
ARFLAGS = $(S_ARFLAGS)
#####

# Construct include path options
!if !(null(INC_DIR))                    #null() is the specify feature of emake.
 INC_PATH = $(INC_DIR:<$(INC_OPT))
!endif

PRE_SYM += _GUI_PROJECT_
# Build defined symbol options for compiling
!if !(null(PRE_SYM))                    #null() is the specify feature of emake.
 SYMBOLS = $(PRE_SYM:<$(SYM_OPT))       #modifier < s the specify feature of emake.
!endif

#####

# Infernece rule
.SUFFIXES: .a .o .c
.c.o:
!if !(null(OUT_OPT))
 $(CC) $(CCFLAGS) $(INC_PATH) $(SYMBOLS) $(OUT_OPT) $@ $<
!else
 $(CC) $(CCFLAGS) $(INC_PATH) $(SYMBOLS) $<
!endif

SPC_CC = $(CC) $(CCFLAGS1) $(INC_PATH) $(SYMBOLS)
!if !(null(OUT_OPT))
 SPC_CC += $(OUT_OPT) $@
!endif
SPC_CC += $<

#####

.PHONY all clean dump
# Target
all: $(OBJS:F,<$(OBJ_DIR)) $(LIB_DIR)$(LIB_F)

# Dependencies
# All object files
$(OBJS:F,<$(OBJ_DIR)) : $(INCS) #$(GUI_DIR)makefile



# The elements' pathes of OBJS are filter out.
# The library file
$(LIB_DIR)$(LIB_F) : $(OBJS:F,<$(OBJ_DIR))
 @echo Building $@....
!if $(AR) == ar # GNU ar has problem in replace option
 @$(REMOVE) $@
!endif
 @$(AR) $(ARFLAGS) $@ $(OBJS:F,<$(OBJ_DIR))

# End.

# Command
clean:
!if -e $(LIB_DIR)$(LIB_F)
 $(REMOVE) $(LIB_DIR)$(LIB_F)
!endif
 $(REMOVE) $(OBJ_DIR)*.o

dump:
	@echo $(CC)
	@echo $(CCFLAGS)
	@echo $(CCFLAGS1)
	@echo $(AS)
	@echo $(ASFLAGS)
	@echo $(AR)
	@echo $(ARFLAGS)
	@echo $(SYMBOLS)
	@echo $(LIB_DIR)
	@echo $(INC_PATH)

⌨️ 快捷键说明

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