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 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 2 of the License, or 8 # (at your option) any later version. 9 10 LIBUBB = ../ben-blinkenlights/libubb 11 SYSLIBS = ../openwrt-xburst/staging_dir/target-mipsel_eglibc-2.15/usr/lib 12 TOOLBIN = ../openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.6-linaro_eglibc-2.15/bin 13 14 ARCH = mipsel-openwrt-linux 15 CC = $(TOOLBIN)/$(ARCH)-gcc 16 17 CFLAGS = -g -Wall -fPIC -march=mips32 -I$(LIBUBB)/include -DNANONOTE # -DDISPLAY_IN_USE=EPD_TYPE_270 # -DDEBUG=1 18 LDFLAGS = -lubb -L$(LIBUBB) #-static #-L$(SYSLIBS) 19 20 TARGET = test 21 SRC = test.c bsp.c Display_COG_Process.c Display_Controller.c Display_Hardware_Driver.c logo.c 22 OBJ = $(SRC:.c=.o) 23 24 .PHONY: all clean distclean 25 26 all: $(TARGET) 27 28 clean: 29 rm -f $(OBJ) $(TARGET) 30 31 distclean: clean 32 echo "Nothing else to clean." 33 34 $(TARGET): $(OBJ) 35 $(CC) $(LDFLAGS) $(OBJ) -o $@ 36 37 .c.o: 38 $(CC) -c $(CFLAGS) $< -o $@