aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-03-23 17:49:32 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-03-23 17:49:32 +0000
commitc171430ffc61d77ace607d17e7daffb58de096e6 (patch)
treef9b60800b2f033dfe1562fc90f1e9b5bd56b2cfe /Makefile
parent7dc935cf2938b1e47b60716654a5879737b5d437 (diff)
factored out code into "shared";
it's still rather unstable... svn path=/trunk/externals/iem/iemnet/; revision=13244
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 32dc974..5a3c822 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,10 @@ SOURCES_iphoneos =
SOURCES_linux =
SOURCES_windows =
+# .c source files that will be statically linked to _all_ objects
+HELPERSOURCES = shared.c
+
+
# list all pd objects (i.e. myobject.pd) files here, and their helpfiles will
# be included automatically
PDOBJECTS =
@@ -133,16 +137,16 @@ CFLAGS += $(OPT_CFLAGS)
all: $(SOURCES:.c=.$(EXTENSION))
%.o: %.c
- $(CC) $(CFLAGS) -o "$*.o" -c "$*.c"
+ $(CC) $(CFLAGS) -o "$@" -c "$<"
-%.$(EXTENSION): %.o
- $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
+%.$(EXTENSION): %.o $(HELPERSOURCES:.c=.o)
+ $(CC) $(LDFLAGS) -o "$@" $^ $(LIBS)
chmod a-x "$*.$(EXTENSION)"
# this links everything into a single binary file
-$(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o
- $(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS)
- chmod a-x $(LIBRARY_NAME).$(EXTENSION)
+$(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(HELPERSOURCES:.c=.o)
+ $(CC) $(LDFLAGS) -o $@.$(EXTENSION) $^ $(LIBS)
+ chmod a-x $@.$(EXTENSION)
install: libdir_install