日期:2014-05-16 浏览次数:20745 次
CROSS=arm-linux-
APPNAME=main
#font objs
FONTDIR = ./font
FONT_OBJS += $(FONTDIR)/font13_ASCII.o
FONT_OBJS += $(FONTDIR)/font13B_ASCII.o
FONT_OBJS += $(FONTDIR)/font16_ASCII.o
FONT_OBJS += $(FONTDIR)/font16B_ASCII.o
FONT_OBJS += $(FONTDIR)/font24_ASCII.o
FONT_OBJS += $(FONTDIR)/font24B_ASCII.o
FONT_OBJS += $(FONTDIR)/font32_ASCII.o
FONT_OBJS += $(FONTDIR)/font32B_ASCII.o
FONT_OBJS += $(FONTDIR)/hzk12.o
FONT_OBJS += $(FONTDIR)/hzk16.o
FONT_OBJS += $(FONTDIR)/hzk24.o
#image objs
IMAGEDIR = ./image
IMAGE_OBJS += $(IMAGEDIR)/image_analog.o
IMAGE_OBJS += $(IMAGEDIR)/image_analog_dbm.o
IMAGE_OBJS += $(IMAGEDIR)/image_analog_dbmv.o
IMAGE_OBJS += $(IMAGEDIR)/image_analog_dbuv.o
IMAGE_OBJS += $(IMAGEDIR)/image_buttons_background.o
IMAGE_OBJS += $(IMAGEDIR)/image_background.o
IMAGE_OBJS += $(IMAGEDIR)/image_battery_0.o
IMAGE_OBJS += $(IMAGEDIR)/image_battery_1.o
IMAGE_OBJS += $(IMAGEDIR)/image_battery_2.o
IMAGE_OBJS += $(IMAGEDIR)/image_battery_3.o
IMAGE_OBJS += $(IMAGEDIR)/image_battery_4.o
IMAGE_OBJS += $(IMAGEDIR)/image_time_background.o
IMAGE_OBJS += $(IMAGEDIR)/image_minispec.o
C_OBJS = lcd_tft.o bmp.o i2c.o main.o keyboard.o gpio.o $(FONT_OBJS) $(IMAGE_OBJS)
all: $(APPNAME)
$(APPNAME): $(C_OBJS)
$(CROSS)gcc -lpthread -o $(APPNAME) $(C_OBJS)
main.o:main.c lcd_tft.h bmp.h i2c.h keyboard.h $(FONTDIR)/font.h $(IMAGEDIR)/image.h
$(CROSS)gcc -c main.c
lcd_tft.o:lcd_tft.c lcd_tft.h $(FONTDIR)/font.h
$(CROSS)gcc -c lcd_tft.c
bmp.o:bmp.c bmp.h
$(CROSS)gcc -c bmp.c
i2c.o:i2c.c i2c.h
$(CROSS)gcc -c i2c.c
keyboard.o:keyboard.c i2c.h keyboard.h
$(CROSS)gcc -c keyboard.c
gpio.o:gpio.c gpio.h
$(CROSS)gcc -c gpio.c
$(FONT_OBJS):
cd $(FONTDIR) && $(MAKE)
$(IMAGE_OBJS):
cd $(IMAGEDIR) && $(MAKE)
clean:
rm -vf $(APPNAME) *.o *.*~ *~
cd $(FONTDIR) && make clean
cd $(IMAGEDIR) && make clean
CROSS=arm-linux-
C_OBJS = font13_ASCII.o font13B_ASCII.o font16_ASCII.o font16B_ASCII.o font24_ASCII.o font24B_ASCII.o font32_ASCII.o font32B_ASCII.o hzk12.o hzk16.o hzk24.o