1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/Makefile Fri Nov 22 22:13:07 2013 +0000
1.3 @@ -0,0 +1,41 @@
1.4 +# Makefile - Build the PCF8833 display software
1.5 +#
1.6 +# Copyright (C) 2013 Paul Boddie
1.7 +#
1.8 +# This program is free software; you can redistribute it and/or modify
1.9 +# it under the terms of the GNU General Public License as published by
1.10 +# the Free Software Foundation; either version 2 of the License, or
1.11 +# (at your option) any later version.
1.12 +
1.13 +LIBUBB = ../ben-blinkenlights/libubb
1.14 +SYSROOT = ../openwrt-xburst/staging_dir/target-mipsel_eglibc-2.15
1.15 +TOOLBIN = ../openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.6-linaro_eglibc-2.15/bin
1.16 +
1.17 +ARCH = mipsel-openwrt-linux
1.18 +CC = $(TOOLBIN)/$(ARCH)-gcc
1.19 +
1.20 +CFLAGS = -g -Wall -fPIC -march=mips32 -I$(LIBUBB)/include # -DDEBUG=1
1.21 +LDFLAGS = -lm -lubb -L$(LIBUBB)
1.22 +
1.23 +TARGETS = spin
1.24 +
1.25 +BASICSRC = pcf8833.c
1.26 +
1.27 +SOURCES = $(BASICSRC) spin.c
1.28 +OBJECTS = $(SOURCES:.c=.o)
1.29 +
1.30 +.PHONY: all clean distclean
1.31 +
1.32 +all: $(TARGETS)
1.33 +
1.34 +clean:
1.35 + rm -f $(OBJECTS) $(TARGETS)
1.36 +
1.37 +distclean: clean
1.38 + echo "Nothing else to clean."
1.39 +
1.40 +$(TARGETS): $(OBJECTS)
1.41 + $(CC) $(LDFLAGS) $(OBJECTS) -o $@
1.42 +
1.43 +.c.o:
1.44 + $(CC) -c $(CFLAGS) $< -o $@