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