📄 makefile.simple
字号:
## Makefile for TriMedia pSOS components# Copyright (c) 1996,2000 TriMedia Technologies Inc. ## Module name : Makefile.simple 1.12## Last update : 13:49:36 - 00/06/19## This is a simple makefile for a pSOS application.# This makefile is designed to be used in the Unix environment.# See its usage in $(PSOS_SYSTEM)/apps/demo1 as an example.# Care was taken to make it portable for use with Microsoft nmake.## Note on using this with Microsoft's nmake:# 1) Copy this file to Makefile.win# 2) In $(PSOS_SYSTEM)/config, copy Makefile to Makefile.win# 3) Replace all / with \ in both files# 4) Change the default rule to# {$(SRC)\}.c.o:# @ echo "Compiling $<"# $(ECHO_OPTION) $(CC) -c $(CFLAGS) $(CINCS) -o $@ $<# 5) Change make command for target bsp.a below to# @ nmake /f $(PSOS_SYSTEM)\configs\Makefile.win PSOS_SYSTEM="$(PSOS_SYSTEM)" APPDIR="." AR="$(AR)" CC="$(CC)" CFLAGS="$(CFLAGS)"# 6) Change object file rule to# .c.o:# @ echo "Compiling $*.c"# @ $(CC) $(CFLAGS) $(CINCS) -c $*.c -o $@# 7) Make sure you take out all \ for line separation# 8) Invoke this makefile by typing at a MS-DOS prompt:# nmake /f Makefile.win## Note on using the pSOS monitor in tmdbg:# 1) add -g to CFLAGS# 2) add $(TCS)/lib/$(ENDIAN)/psosmon.o to the link line of your application:# @ $(CC) \# $(OBJECTS) $(PSOS_SYSTEM)/sys/os/psos_tm_$(ENDIAN).o bsp.a \# $(TCS)/lib/$(ENDIAN)/psosmon.o $(LDFLAGS) $(CFLAGS) -o $(APPLICATION)# 3) remove linker optimizations in LDFLAGS## Fill in these appropriately for your application and host configuration# HOST: Win95, WinNT, MacOS, tmsim, nohost# ENDIAN: el, ebTCS = /usr/local/tcsHOST = Win95ENDIAN = elAPPLICATION = a.outOBJECTS = root.o target: $(APPLICATION)# You normally should not need to change the followingPSOS_SYSTEM = $(TCS)/OS/pSOS/pSOSystemPSOS_DEFS = -DSC_PSOS=YES -DSC_PSOSM=NO -DSC_PNA=NOCC = $(TCS)/bin/tmcc -host $(HOST) -$(ENDIAN) $(PSOS_DEFS)LD = $(TCS)/bin/tmldAR = $(TCS)/bin/tmarCINCS = -I. -I$(PSOS_SYSTEM)/includeCFLAGS =LDFLAGS =$(APPLICATION): bsp.a $(OBJECTS) Makefile @ echo "Linking $(APPLICATION)" @ $(CC) \ $(OBJECTS) $(PSOS_SYSTEM)/sys/os/psos_tm_$(ENDIAN).o bsp.a \ $(LDFLAGS) $(CFLAGS) -o $(APPLICATION)bsp.a: @ make -f $(PSOS_SYSTEM)/configs/Makefile \ PSOS_SYSTEM="$(PSOS_SYSTEM)" \ AR="$(AR)" CC="$(CC)" CFLAGS="$(CFLAGS)"%o: %c @ echo "Compiling $(*)c" @ $(CC) $(CFLAGS) $(CINCS) -c $(*)c -o $@clean: rm -fr $(APPLICATION) *.o bsp.a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -