Stefan Schuermans
Makefile fixed for MAC OS X, removed version information from soure files
Stefan Schuermans commited a6637d3 at 2011-09-10 13:38:14
# BlinkenLib
# Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html
# a blinkenarea.org project
CC=gcc
INCDIR=-I/sw/include
LIBDIR=-L/sw/lib
.phony: all clean
all: config.cfg config.mk config.h
osx.cfg:
echo "OSX=" | tr -d '\n' >osx.cfg
(if [ "$$(uname -s)" == "Darwin" ]; then echo "1"; else echo "0"; fi) >>osx.cfg
mng.cfg:
echo "MNG=" | tr -d '\n' >mng.cfg
(($(CC) $(INCDIR) $(LIBDIR) -o mng mng.c -lmng && ./mng && echo "1") || echo "0") >>mng.cfg
rm -f mng
config.cfg: osx.cfg mng.cfg
cat $+ >config.cfg
config.mk: config.cfg
sed 's/^\([A-Z]*\)=\([01]\)$$/BLINKENLIB_CFG_\1=\2/' <$< >$@
config.h: config.cfg
sed 's/^\([A-Z]*\)=0$$/#undef BLINKENLIB_CFG_\1/;s/^\([A-Z]*\)=1$$/#define BLINKENLIB_CFG_\1/' <$< >$@
echo '#define BLINKENLIB_CONFIG "' | tr -d '\n' >>$@
sed 's/^\([A-Z]*\)=0$$/\1-/;s/^\([A-Z]*\)=1$$/\1+/' <$< | tr '\n' ' ' | sed 's/ *$$//' | tr -d '\n' >>$@
echo '"' >>$@
clean:
rm -f *.cfg config.mk config.h
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX