diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2007-04-19 13:40:34 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2007-04-19 13:40:34 +0000 |
commit | 6e753c27c5fce5c804b60e041585b47f665bf42e (patch) | |
tree | cecb3a43bb3650bf34b2baf69e2570b8ce0843ba | |
parent | bc88edeb5009472edc01a448c80e11292c035558 (diff) |
...
svn path=/trunk/externals/loaders/hexloader/; revision=7583
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | hexloader.c | 18 |
2 files changed, 28 insertions, 9 deletions
@@ -13,24 +13,31 @@ PDLIBDIR=$(PDROOT)/bin # people have to specify it at the cmdline: eg "make pd_linux" EXTENSION=$(MAKECMDGOALS) + +DEFINES=-DPD + # if no filename-extension is supplied by the user # try to guess one, based on what "uname" tells us UNAME := $(shell uname -s) ifeq ($(UNAME),Linux) DEFAULTEXTENSION= pd_linux + DEFINES+=-DDL_OPEN else ifeq ($(UNAME),Darwin) DEFAULTEXTENSION= pd_darwin + DEFINES+=-DDL_OPEN else ifeq (MINGW,$(findstring MINGW,$(UNAME))) - DEFAULTEXTENSION= pd_nt + DEFAULTEXTENSION=pd_nt else ifeq ($(UNAME),IRIX) UNAMEV := $(shell uname -R) ifeq (6.,$(findstring 6.,$(UNAMEV))) DEFAULTEXTENSION= pd_irix6 + DEFINES+=-DDL_OPEN else DEFAULTEXTENSION= pd_irix5 + DEFINES+=-DDL_OPEN endif else DEFAULTEXTENSION=help @@ -61,7 +68,7 @@ TARGETS=$(SOURCES:.c=.$(EXTENSION)) pd_linux: $(TARGETS) -LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \ +LINUXCFLAGS = $(DEFINES) -O2 -funroll-loops -fomit-frame-pointer -fPIC \ -Wall -W -Wshadow -Wstrict-prototypes -Werror \ -Wno-unused -Wno-parentheses -Wno-switch @@ -79,7 +86,7 @@ LINUXINCLUDE = -I$(PDSRCDIR) pd_darwin: $(TARGETS) -DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ +DARWINCFLAGS = $(DEFINES) -O2 -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch DARWININCLUDE = -I$(PDSRCDIR) @@ -93,7 +100,7 @@ DARWINLDFLAGS = -bundle -undefined suppress -flat_namespace # ----------------------- IRIX 5.x ----------------------- pd_irix5: $(TARGETS) -SGICFLAGS5 = -o32 -DPD -DSGI -O2 +SGICFLAGS5 = -o32 $(DEFINES) -DSGI -O2 SGIINCLUDE = -I$(PDSRCDIR) @@ -108,7 +115,7 @@ SGILDFLAGS = -elf -shared -rdata_shared # ----------------------- IRIX 6.x ----------------------- pd_irix6: $(TARGETS) -SGICFLAGS6 = -DPD -DSGI -n32 \ +SGICFLAGS6 = $(DEFINES) -DSGI -n32 \ -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \ -Ofast=ip32 @@ -141,7 +148,7 @@ PDNTLIB = $(PDNTLDIR)\libc.lib \ pd_nt: $(TARGETS) -MINGWCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ +MINGWCFLAGS = $(DEFINES) -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wshadow -Wstrict-prototypes -Werror \ -Wno-unused -Wno-parentheses -Wno-switch -mms-bitfields diff --git a/hexloader.c b/hexloader.c index a027e15..9535971 100644 --- a/hexloader.c +++ b/hexloader.c @@ -1,9 +1,21 @@ +/* Copyright (c) 2007 IOhannes m zmölnig @ IEM + * For information on usage and redistribution, and for a DISCLAIMER OF ALL + * WARRANTIES, see the file, "LICENSE.txt," that comes with Pd. + */ + +/* + * this code adds an external "loader" to Miller S. Puckette's "pure data", + * which allows the loading of libraries/externals with special characters + * in the classname + * + * the infrastructure of this file is based on hcsteiner's "libdir" loader + */ + + #ifdef __WIN32__ # define MSW #endif -#define DL_OPEN - #include "m_pd.h" #include "s_stuff.h" #include "g_canvas.h" @@ -42,7 +54,7 @@ typedef struct _hexloader } t_hexloader; static t_class *hexloader_class; -static char *version = "$Revision: 1.1 $"; +static char *version = "$Revision: 1.2 $"; static char*hex_dllextent[] = { |