############################################################# # # LCD modules # ############################################################# LCD_BUILD_DIR:=$(BUILD_DIR)/lcd LCD_SOURCE=$(FLI4L_SRC)/lcd/lcd/driver-rr $(LCD_BUILD_DIR)/lcd_module.c: -mkdir -p $(LCD_BUILD_DIR) echo "obj-m := lcd.o" > $(LCD_BUILD_DIR)/Makefile echo "lcd-objs := lcd_module.o" >> $(LCD_BUILD_DIR)/Makefile for file in c_table.h version.h lcd_module.c lcd.h; do \ cp $(LCD_SOURCE)/$$file $(LCD_BUILD_DIR); \ done # # compile driver # $(LCD_BUILD_DIR)/lcd.ko: $(LCD_BUILD_DIR)/lcd_module.c $(MAKE) CC=$(TARGET_CC) -C $(LINUX_DIR) SUBDIRS=$(LCD_BUILD_DIR) modules V=1 # # install driver # $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc/lcd.ko: $(LCD_BUILD_DIR)/lcd.ko install -D -m 664 $(LCD_BUILD_DIR)/lcd.ko $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc/lcd.ko lcd: $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc/lcd.ko lcd-clean: -rm -f $(LCD_BUILD_DIR)/*.ko $(LCD_BUILD_DIR)/*.o rm -rf $(LCD_BUILD_DIR)/.* rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/kernel/misc/lcd.ko lcd-source: $(LCD_SOURCE) lcd-dirclean: rm -rf $(LCD_BUILD_DIR)