diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2008-06-13 13:28:08 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:08:23 +0200 |
commit | 124ec02a0b4114bb52bcb8c44c4d76de737f6e6c (patch) | |
tree | 5837b9a3696dab0062d502d516cb00576fb2ad8d | |
parent | 4fd2d8a51cea2577f985148583539d0f7727da63 (diff) |
probably got the svnversion magic going
svn path=/trunk/externals/iem/dmx512/; revision=9992
-rw-r--r-- | dmx512/src/Make.version | 2 | ||||
-rw-r--r-- | dmx512/src/Makefile | 8 | ||||
-rw-r--r-- | dmx512/src/dmx4pd.h | 6 | ||||
-rw-r--r-- | dmx512/src/dmxout.c | 9 |
4 files changed, 17 insertions, 8 deletions
diff --git a/dmx512/src/Make.version b/dmx512/src/Make.version index 0bc041a..0bdb8b4 100644 --- a/dmx512/src/Make.version +++ b/dmx512/src/Make.version @@ -1 +1 @@ -VERSION = $(shell svnversion) +VERSION = $(shell svnversion | grep -e "[0-9]") diff --git a/dmx512/src/Makefile b/dmx512/src/Makefile index a9c06db..e634df6 100644 --- a/dmx512/src/Makefile +++ b/dmx512/src/Makefile @@ -2,11 +2,17 @@ default: all include Make.version + Make.config: Make.config.in configure ./configure -include Make.config +#VERSIONDEFINE = _$(strip $(VERSION))_ +ifneq ($(strip $(VERSION)),) +VERSIONDEFINE = -DDMX4PD_VERSION="\"rev.$(VERSION)\"" +endif + .SUFFIXES: .$(EXT) SOURCES=$(sort $(filter %.c, $(wildcard *.c))) @@ -48,7 +54,7 @@ everything: clean all install distclean $(TARGETS): %.o : %.c Make.config - $(CC) $(DMX4PD_CFLAGS) -DDMX4PD_VERSION="\"$(VERSION)\"" -c -o $@ $*.c + $(CC) $(DMX4PD_CFLAGS) $(VERSIONDEFINE) -c -o $@ $*.c $(OBJECTS): %.$(EXT) : %.o $(LD) $(LFLAGS) -o $@ $*.o $(LIBS) diff --git a/dmx512/src/dmx4pd.h b/dmx512/src/dmx4pd.h index 0987926..d386c28 100644 --- a/dmx512/src/dmx4pd.h +++ b/dmx512/src/dmx4pd.h @@ -26,9 +26,11 @@ #include "m_pd.h" -#define DMX4PD_POSTBANNER \ - post("DMX4PD ver %s: (c) 2008 IOhannes m zmölnig - iem @ kug", DMX4PD_VERSION); +#define DMX4PD_POSTBANNER \ + { \ + post("DMX4PD ("DMX4PD_VERSION"): (c) 2008 IOhannes m zmölnig - iem @ kug"); \ + } #endif /* INCLUDE_DMX4PD_H__ */ diff --git a/dmx512/src/dmxout.c b/dmx512/src/dmxout.c index af812b9..b9066cb 100644 --- a/dmx512/src/dmxout.c +++ b/dmx512/src/dmxout.c @@ -64,7 +64,7 @@ static void dmxout_close(t_dmxout*x) static void dmxout_open(t_dmxout*x, t_symbol*s_devname) { int argc=2; - char *args[2] = {"--dmx", s_devname->s_name}; + const char *args[2] = {"--dmx", s_devname->s_name}; const char**argv=args; char*devname=""; int fd; @@ -138,7 +138,7 @@ static void *dmxout_new(t_symbol*s, int argc, t_atom*argv) static void *dmxout_free(t_dmxout*x) { - + dmxout_close(x); } @@ -151,6 +151,7 @@ void dmxout_setup(void) class_addfloat(dmxout_class, dmxout_float); - - post("DMX4PD (ver.%s): (c) 2008 IOhannes m zmölnig - iem @ kug", DMX4PD_VERSION); +#ifdef DMX4PD_POSTBANNER + DMX4PD_POSTBANNER +#endif } |