makefile模板

该博客展示了一个makefile文件的内容,包含系统名称、文件名、编译器、OS等信息。详细列出了从源文件生成目标文件的编译规则,如从test.x30生成test.mot,以及多个.r30文件的生成规则,还包含了清理临时文件的规则。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#******************************************************************************
#  System Name : 偙偺僾儘僌儔儉偼嫵堢梡偱偡丅(揮梡晄壜)
#  File Name   : makefile(拵怘偄)
#  Contents    : 墘廗10-B 幚峴僼傽僀儖偺惗惉庤弴傪婰弎偡傞
#  Model       : OAKS16-LCD Board懳墳
#  CPU         : M16C/60僔儕乕僘
#  Compiler    : NC30WA(V.4.00 Release 2 - Entry)
#  OS          : 巊梡偣偢
#  Programer   : 儖僱僒僗敿摫懱僩儗乕僯儞僌僙儞僞乕
#  Note        : OAKS16-M30620FCAFP(M16C/62僌儖乕僾,16MHz)懳墳
#******************************************************************************

test.mot: test.x30
    lmc30 -ID#00000000000000 test.x30

#(栤戣)嶌惉偝傟傞僆僽僕僃僋僩僼傽僀儖傪慡偰婰弎偟偰偔偩偝偄丅

#test.x30: startup.r30 main.r30 intr.r30 lcd1.r30 strutl.r30 init.r30 lcd.r30 data.r30 sw.r30 sdrv.r30 ds.r30 ln30.sub


test.x30: flag1 flag2 ln30.sub
    ln30 @ln30.sub
flag1: startup.r30 main.r30 intr.r30 lcd1.r30 strutl.r30
flag2: init.r30 lcd.r30 data.r30 sw.r30 sdrv.r30 ds.r30

ln30.sub: makefile
#(栤戣)嶌惉偝傟傞僆僽僕僃僋僩僼傽僀儖傪慡偰婰弎偟偰偔偩偝偄丅
    @command /c echo startup.r30 main.r30 intr.r30 lcd1.r30 strutl.r30 init.r30 lcd.r30 >ln30.sub
    @command /c echo data.r30 sw.r30 sdrv.r30 ds.r30                            >>ln30.sub
    @command /c echo -G -L nc30lib.lib -MS -T                            >>ln30.sub
    @command /c echo -O test.x30                                        >>ln30.sub

#(栤戣)慡偰偺傾僙儞僽儕尵岅僼傽僀儖偵偮偄偰偺儖乕儖傪婰弎偟偰偔偩偝偄丅
startup.r30: startup.a30 target.inc sect.inc
    as30 -LSIM -S -T startup.a30
      
lcd1.r30: lcd1.a30 target.inc
    as30 -LSIM -S -T lcd1.a30
 
intr.r30: intr.a30
    as30 -LSIM -S -T intr.a30

#(栤戣)慡偰偺C尵岅僼傽僀儖偵偮偄偰偺儖乕儖傪婰弎偟偰偔偩偝偄丅
main.r30: main.c defs.h sdrv.h data.h dS.h intr.h sw.h init.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM main.c

strutl.r30: strutl.c defs.h strutl.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM strutl.c

lcd.r30: lcd.c lcd1.h lcd.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM lcd.c
    
init.r30: init.c defs.h lcd1.h lcd.h target.h init.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM init.c
    
#intta0.r30: intta0.c defs.h intta0.h
#    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM intta0.c
    
data.r30: data.c defs.h data.h strutl.h target.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM data.c
    
sw.r30: sw.c defs.h sw.h target.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM sw.c
    
sdrv.r30: sdrv.c defs.h sdrv.h lcd.h target.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM sdrv.c
    
ds.r30: ds.c defs.h ds.h lcd.h strutl.h
    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM ds.c

#in.r30: in.c defs.h in.h init.h
#    nc30 -c -g -fB -WUP -WNP -Wmake_tagfile -fER -fFRAM in.c    
    
clean:
    -del *.r30
    -del *.lst
    -del *.stk
    -del test.map
    -del test.x30
    -del ln30.sub
    -del test.id
    -del test.mot

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值