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