Demo中bustest的makefile文件:

         cc = arm-linux-gcc

         #LIBS = -lpthread - lsqlite3

         obj = sourc/main.c

         obj += app/fbtools.c

         obj += driver/sd/sd.c

         obj += driver/beep/beep.c

         obj += driver/rtc/rtc.c

         obj += driver/gprs/gprs.c

         obj += driver/mifare/mifare.c

         obj += driver/sound/sound.c

         obj += driver/usb/usb.c

         obj += driver/key/key.c

         maintest:$(obj) $(cc) -o maintest $(obj) $(LIBS)

         .PHONY:clean

         clean:

                     @rm -rf maintest *~ *.o ./sourc/*~ ./app/*~ ./*~ driver/mifare/*~ driver/sd/*~ driver/beep/*~ driver/rtc/*~ driver/gprs/*~ driver/mifare/*~ driver/sound/*~ driver/usb/*~ dirver/key/*~

文中“obj”表示后面.c文件需要生成的文件.o。maintest是最终需要生成可执行文件。.PHONY:clean 表示clean是伪目标文件。

 

 posted on 2012-07-09 18:03  小代码  阅读(155)  评论(0编辑  收藏  举报