1 # Makefile - Build the epaper software 2 # 3 # Copyright (C) 2013 Paul Boddie 4 # 5 # This program is free software; you can redistribute it and/or modify it under 6 # the terms of the GNU General Public License as published by the Free Software 7 # Foundation; either version 3 of the License, or (at your option) any later 8 # version. 9 # 10 # This program is distributed in the hope that it will be useful, but WITHOUT 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 # details. 14 # 15 # You should have received a copy of the GNU General Public License along with 16 # this program. If not, see <http://www.gnu.org/licenses/>. 17 18 LIBUBB = ../ben-blinkenlights/libubb 19 SYSLIBS = ../openwrt-xburst/staging_dir/target-mipsel_eglibc-2.15/usr/lib 20 TOOLBIN = ../openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.6-linaro_eglibc-2.15/bin 21 22 ARCH = mipsel-openwrt-linux 23 CC = $(TOOLBIN)/$(ARCH)-gcc 24 25 CFLAGS = -g -Wall -fPIC -march=mips32 -I$(LIBUBB)/include -DNANONOTE # -DDISPLAY_IN_USE=EPD_TYPE_270 # -DDEBUG=1 26 LDFLAGS = -lubb -L$(LIBUBB) #-static #-L$(SYSLIBS) 27 28 TARGET = epaper 29 SRC = epaper.c bsp.c Display_COG_Process.c Display_Controller.c Display_Hardware_Driver.c images.c 30 OBJ = $(SRC:.c=.o) 31 32 .PHONY: all clean distclean 33 34 all: $(TARGET) 35 36 clean: 37 rm -f $(OBJ) $(TARGET) 38 39 distclean: clean 40 echo "Nothing else to clean." 41 42 $(TARGET): $(OBJ) 43 $(CC) $(LDFLAGS) $(OBJ) -o $@ 44 45 .c.o: 46 $(CC) -c $(CFLAGS) $< -o $@