Stefan Schuermans commited on 2011-09-10 13:38:14
Showing 22 changed files, with 26 additions and 55 deletions.
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
/* BlinkenLib |
2 |
- * version 0.6.5 date 2011-04-26 |
|
3 | 2 |
* Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
* a blinkenarea.org project |
... | ... |
@@ -126,7 +125,6 @@ int main( int argCnt, char * * args ) |
126 | 125 |
|
127 | 126 |
//print info |
128 | 127 |
printf( "BlinkenLib - BlinkenConv\n" |
129 |
- "version 0.6.5 date 2011-04-26\n" |
|
130 | 128 |
"config "BLINKENLIB_CONFIG"\n" |
131 | 129 |
"Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n" |
132 | 130 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
/* BlinkenLib |
2 |
- * version 0.6.5 date 2011-04-26 |
|
3 | 2 |
* Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
* a blinkenarea.org project |
... | ... |
@@ -140,15 +139,15 @@ static int serial_settings_set( int fd, int settings, int speed ) |
140 | 139 |
tio.c_cc[VTIME] = 10; //1 sec timeout |
141 | 140 |
tio.c_cc[VMIN] = 0; //return on single char read |
142 | 141 |
|
143 |
-#if BLINKENLIB_CFG_OSX |
|
142 |
+#ifdef BLINKENLIB_CFG_OSX |
|
144 | 143 |
if( cfsetspeed( &tio, speed ) == - 1 ) |
145 | 144 |
{ |
146 | 145 |
printf( "cfsetspeed: error: %s\n", strerror( errno ) ); |
147 | 146 |
return 0; |
148 | 147 |
} |
149 |
-#else //#if BLINKENLIB_CFG_OSX |
|
148 |
+#else //#ifdef BLINKENLIB_CFG_OSX |
|
150 | 149 |
tio.c_cflag |= speed; |
151 |
-#endif //#if BLINKENLIB_CFG_OSX |
|
150 |
+#endif //#ifdef BLINKENLIB_CFG_OSX |
|
152 | 151 |
|
153 | 152 |
if( tcsetattr( fd, TCSANOW, &tio ) == -1 ) |
154 | 153 |
{ |
... | ... |
@@ -423,7 +422,6 @@ int main( int argCnt, char * * args ) |
423 | 422 |
|
424 | 423 |
//print info |
425 | 424 |
printf( "BlinkenLib - BlinkenOutput\n" |
426 |
- "version 0.6.5 date 2011-04-26\n" |
|
427 | 425 |
"config "BLINKENLIB_CONFIG"\n" |
428 | 426 |
"Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n" |
429 | 427 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
/* BlinkenLib |
2 |
- * version 0.6.5 date 2011-04-26 |
|
3 | 2 |
* Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
* a blinkenarea.org project |
... | ... |
@@ -350,7 +349,6 @@ int main( int argCnt, char * * args ) |
350 | 349 |
|
351 | 350 |
//print info |
352 | 351 |
printf( "BlinkenLib - BlinkenOutput\n" |
353 |
- "version 0.6.5 date 2011-04-26" |
|
354 | 352 |
"Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n" |
355 | 353 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
356 | 354 |
"a blinkenarea.org project\n\n" ); |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
/* BlinkenLib |
2 |
- * version 0.6.5 date 2011-04-26 |
|
3 | 2 |
* Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
* a blinkenarea.org project |
... | ... |
@@ -32,7 +31,6 @@ int main( int argCnt, char * * args ) |
32 | 31 |
|
33 | 32 |
//print info |
34 | 33 |
printf( "BlinkenLib - BlinkenRecv\n" |
35 |
- "version 0.6.5 date 2011-04-26\n" |
|
36 | 34 |
"config "BLINKENLIB_CONFIG"\n" |
37 | 35 |
"Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n" |
38 | 36 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
/* BlinkenLib |
2 |
- * version 0.6.5 date 2011-04-26 |
|
3 | 2 |
* Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
* a blinkenarea.org project |
... | ... |
@@ -35,7 +34,6 @@ int main( int argCnt, char * * args ) |
35 | 34 |
|
36 | 35 |
//print info |
37 | 36 |
printf( "BlinkenLib - BlinkenSend\n" |
38 |
- "version 0.6.5 date 2011-04-26\n" |
|
39 | 37 |
"config "BLINKENLIB_CONFIG"\n" |
40 | 38 |
"Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n" |
41 | 39 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
# BlinkenLib |
2 |
-# version 0.6.5 date 2011-04-26 |
|
3 | 2 |
# Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
# a blinkenarea.org project |
... | ... |
@@ -12,15 +11,19 @@ RANLIB=ranlib |
12 | 11 |
|
13 | 12 |
VERSION_MAJOR=0 |
14 | 13 |
VERSION_MINOR=6 |
15 |
-VERSION_REVISION=5 |
|
14 |
+VERSION_REVISION=6 |
|
16 | 15 |
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION) |
17 | 16 |
|
18 | 17 |
include ../config/config.mk |
19 | 18 |
|
20 | 19 |
ifeq ($(BLINKENLIB_CFG_OSX),1) |
21 | 20 |
SHLIBEXT=dylib |
21 |
+CFLAGS+=-I/sw/include |
|
22 |
+LFLAGS+=-L/sw/lib |
|
23 |
+SONAMEOPT= |
|
22 | 24 |
else |
23 | 25 |
SHLIBEXT=so |
26 |
+SONAMEOPT=-Wl,-soname,libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR) |
|
24 | 27 |
endif |
25 | 28 |
|
26 | 29 |
ifeq ($(BLINKENLIB_CFG_MNG),1) |
... | ... |
@@ -58,7 +61,7 @@ libBlinkenLib.a: $(LIB_OBJS) |
58 | 61 |
$(RANLIB) $@ |
59 | 62 |
|
60 | 63 |
libBlinkenLib.$(SHLIBEXT).$(VERSION): $(LIB_OBJS) |
61 |
- $(CC) -shared -Wl,-soname,libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR) -o $@ $+ $(LMNG) |
|
64 |
+ $(CC) -shared $(SONAMEOPT) $(LFLAGS) -o $@ $+ $(LMNG) |
|
62 | 65 |
|
63 | 66 |
libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR): libBlinkenLib.$(SHLIBEXT).$(VERSION) |
64 | 67 |
rm -f $@ |
... | ... |
@@ -1,12 +1,11 @@ |
1 | 1 |
# BlinkenLib |
2 |
-# version 0.6.5 date 2011-04-26 |
|
3 | 2 |
# Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
# a blinkenarea.org project |
6 | 5 |
|
7 | 6 |
VERSION_MAJOR=0 |
8 | 7 |
VERSION_MINOR=6 |
9 |
-VERSION_REVISION=5 |
|
8 |
+VERSION_REVISION=6 |
|
10 | 9 |
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION) |
11 | 10 |
|
12 | 11 |
DATE:=$(shell date +%Y-%m-%d) |
... | ... |
@@ -37,17 +36,3 @@ install: all |
37 | 36 |
uninstall: |
38 | 37 |
$(MAKE) -C install uninstall |
39 | 38 |
|
40 |
-update: distclean |
|
41 |
- sed -i "s/version [0-9.]* date [0-9-]*/version $(VERSION) date $(DATE)/" $(UPDATE_FILES) |
|
42 |
- sed -i "s/\(Copyright [0-9]*-\)[0-9]*/\1$(YEAR)/" $(UPDATE_FILES) |
|
43 |
- sed -i "s/^VERSION_MAJOR=.*$$/VERSION_MAJOR=$(VERSION_MAJOR)/" $(UPDATE_FILES) |
|
44 |
- sed -i "s/^VERSION_MINOR=.*$$/VERSION_MINOR=$(VERSION_MINOR)/" $(UPDATE_FILES) |
|
45 |
- sed -i "s/^VERSION_REVISION=.*$$/VERSION_REVISION=$(VERSION_REVISION)/" $(UPDATE_FILES) |
|
46 |
- |
|
47 |
-pack: update |
|
48 |
- mkdir -p pack |
|
49 |
- mkdir -p tmp/BlinkenLib-$(VERSION)_$(DATE) |
|
50 |
- cp -r $(PACK_FILES) tmp/BlinkenLib-$(VERSION)_$(DATE) |
|
51 |
- tar -C tmp -jcf pack/BlinkenLib-$(VERSION)_$(DATE).tar.bz2 BlinkenLib-$(VERSION)_$(DATE) |
|
52 |
- rm -rf tmp |
|
53 |
- |
... | ... |
@@ -1,22 +1,23 @@ |
1 | 1 |
# BlinkenLib |
2 |
-# version 0.6.5 date 2011-04-26 |
|
3 | 2 |
# Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
# a blinkenarea.org project |
6 | 5 |
|
7 | 6 |
CC=gcc |
7 |
+INCDIR=-I/sw/include |
|
8 |
+LIBDIR=-L/sw/lib |
|
8 | 9 |
|
9 | 10 |
.phony: all clean |
10 | 11 |
|
11 | 12 |
all: config.cfg config.mk config.h |
12 | 13 |
|
13 | 14 |
osx.cfg: |
14 |
- echo -n "OSX=" >osx.cfg |
|
15 |
+ echo "OSX=" | tr -d '\n' >osx.cfg |
|
15 | 16 |
(if [ "$$(uname -s)" == "Darwin" ]; then echo "1"; else echo "0"; fi) >>osx.cfg |
16 | 17 |
|
17 | 18 |
mng.cfg: |
18 |
- echo -n "MNG=" >mng.cfg |
|
19 |
- (($(CC) -o mng mng.c -lmng && ./mng && echo "1") || echo "0") >>mng.cfg |
|
19 |
+ echo "MNG=" | tr -d '\n' >mng.cfg |
|
20 |
+ (($(CC) $(INCDIR) $(LIBDIR) -o mng mng.c -lmng && ./mng && echo "1") || echo "0") >>mng.cfg |
|
20 | 21 |
rm -f mng |
21 | 22 |
|
22 | 23 |
config.cfg: osx.cfg mng.cfg |
... | ... |
@@ -27,8 +28,8 @@ config.mk: config.cfg |
27 | 28 |
|
28 | 29 |
config.h: config.cfg |
29 | 30 |
sed 's/^\([A-Z]*\)=0$$/#undef BLINKENLIB_CFG_\1/;s/^\([A-Z]*\)=1$$/#define BLINKENLIB_CFG_\1/' <$< >$@ |
30 |
- echo -n '#define BLINKENLIB_CONFIG "' >>$@ |
|
31 |
- sed 's/^\([A-Z]*\)=0$$/\1-/;s/^\([A-Z]*\)=1$$/\1+/' <$< | tr '\n' ' ' | sed 's/ *$$//' >>$@ |
|
31 |
+ echo '#define BLINKENLIB_CONFIG "' | tr -d '\n' >>$@ |
|
32 |
+ sed 's/^\([A-Z]*\)=0$$/\1-/;s/^\([A-Z]*\)=1$$/\1+/' <$< | tr '\n' ' ' | sed 's/ *$$//' | tr -d '\n' >>$@ |
|
32 | 33 |
echo '"' >>$@ |
33 | 34 |
|
34 | 35 |
clean: |
... | ... |
@@ -1,5 +1,4 @@ |
1 | 1 |
# BlinkenLib |
2 |
-# version 0.6.5 date 2011-04-26 |
|
3 | 2 |
# Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org> |
4 | 3 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
5 | 4 |
# a blinkenarea.org project |
... | ... |
@@ -8,7 +7,7 @@ INSTALL=install |
8 | 7 |
|
9 | 8 |
VERSION_MAJOR=0 |
10 | 9 |
VERSION_MINOR=6 |
11 |
-VERSION_REVISION=5 |
|
10 |
+VERSION_REVISION=6 |
|
12 | 11 |
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION) |
13 | 12 |
|
14 | 13 |
include ../config/config.mk |
... | ... |
@@ -41,13 +40,13 @@ EXECS=BlinkenConv BlinkenSend BlinkenRecv BlinkenOutput |
41 | 40 |
|
42 | 41 |
install: |
43 | 42 |
$(INSTALL) -d $(PREFIX)/include/BlinkenLib |
44 |
- $(INSTALL) -t $(PREFIX)/include/BlinkenLib $(addprefix ../BlinkenLib/, $(HEADERS)) |
|
43 |
+ $(INSTALL) $(addprefix ../BlinkenLib/, $(HEADERS)) $(PREFIX)/include/BlinkenLib |
|
45 | 44 |
$(INSTALL) -d $(PREFIX)/lib |
46 |
- $(INSTALL) -t $(PREFIX)/lib $(addprefix ../BlinkenLib/, $(LIBS)) |
|
45 |
+ $(INSTALL) $(addprefix ../BlinkenLib/, $(LIBS)) $(PREFIX)/lib |
|
47 | 46 |
ln -sf libBlinkenLib.$(SHLIBEXT).$(VERSION) $(PREFIX)/lib/libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR) |
48 | 47 |
ln -sf libBlinkenLib.$(SHLIBEXT).$(VERSION_MAJOR) $(PREFIX)/lib/libBlinkenLib.$(SHLIBEXT) |
49 | 48 |
$(INSTALL) -d $(PREFIX)/bin |
50 |
- $(INSTALL) -t $(PREFIX)/bin $(addprefix ../BlinkenLib/, $(EXECS)) |
|
49 |
+ $(INSTALL) $(addprefix ../BlinkenLib/, $(EXECS)) $(PREFIX)/bin |
|
51 | 50 |
|
52 | 51 |
uninstall: |
53 | 52 |
rm -f $(addprefix $(PREFIX)/bin/, $(EXECS)) |
54 | 53 |