Permalink
Browse files

common LV2 .dylib/.so setting

  • Loading branch information...
1 parent aebafba commit aed9aee81591360ac993a3a2a6197aa0ce1a1464 @x42 x42 committed Mar 22, 2013
Showing with 35 additions and 24 deletions.
  1. +24 −17 .gitignore
  2. +1 −2 b_overdrive/Makefile
  3. +1 −2 b_reverb/Makefile
  4. +6 −1 b_synth/Makefile
  5. +1 −2 b_whirl/Makefile
  6. +2 −0 common.mak
View
@@ -4,21 +4,28 @@ tags
cscope.files
cscope.out
-b_overdrive/overmaker
-b_overdrive/overdrive.c
-b_overdrive/jboverdrive
-b_overdrive/b_overdrive.so
-b_overdrive/manifest.ttl
-b_whirl/b_whirl.so
-b_whirl/manifest.ttl
-b_reverb/b_reverb.so
-b_reverb/manifest.ttl
-b_synth/b_synth.so
-b_synth/manifest.ttl
-src/setBfree
-src/configd
-src/programd
-src/defaultpgm.h
-vb3kb/vb3kb
+/b_*/*.so
+/b_*/*.dylib
-doc/html
+# binaries
+/src/setBfree
+/src/configd
+/src/programd
+/vb3kb/vb3kb
+/b_overdrive/jboverdrive
+/b_overdrive/overmaker
+
+# generated files
+/src/defaultpgm.h
+/b_overdrive/overdrive.c
+
+# generated LV2 metadata
+/b_overdrive/manifest.ttl
+/b_whirl/manifest.ttl
+/b_reverb/manifest.ttl
+/b_synth/manifest.ttl
+/b_synth/manifest.ttl
+/b_synth/b_synth.ttl
+
+/*.tar.gz
+/doc/html
View
@@ -6,7 +6,6 @@ targets=overdrive.o
ifeq ($(LV2AVAIL), yes)
targets+=lv2
- LIB_EXT=.so
LV2NAME=b_overdrive
endif
@@ -37,7 +36,7 @@ manifest.ttl:
sed "s/@LV2NAME@/$(LV2NAME)/;s/@LIB_EXT@/$(LIB_EXT)/" manifest.ttl.in > manifest.ttl
$(LV2NAME)$(LIB_EXT): lv2.c overdrive.o
- $(CC) -o $(LV2NAME)$(LIB_EXT) $(CFLAGS) -shared -Wl,-Bstatic -Wl,-Bdynamic lv2.c overdrive.o
+ $(CC) -o $(LV2NAME)$(LIB_EXT) $(CFLAGS) -shared $(LV2LDFLAGS) lv2.c overdrive.o
overdrive.o: overmaker overdrive.h ../src/cfgParser.h ../src/midi.h
./overmaker > overdrive.c
View
@@ -6,7 +6,6 @@ targets=reverb.o
ifeq ($(LV2AVAIL), yes)
targets+=lv2
- LIB_EXT=.so
LV2NAME=b_reverb
endif
@@ -18,7 +17,7 @@ manifest.ttl:
sed "s/@LV2NAME@/$(LV2NAME)/;s/@LIB_EXT@/$(LIB_EXT)/" manifest.ttl.in > manifest.ttl
$(LV2NAME)$(LIB_EXT): lv2.c reverb.o
- $(CC) -o $(LV2NAME)$(LIB_EXT) $(CFLAGS) -shared -Wl,-Bstatic -Wl,-Bdynamic lv2.c reverb.o
+ $(CC) -o $(LV2NAME)$(LIB_EXT) $(CFLAGS) -shared $(LV2LDFLAGS) lv2.c reverb.o
%.o: %c %.h ../src/cfgParser.h
View
@@ -9,7 +9,6 @@ HAVE_UI=yes
targets=
ifeq ($(LV2AVAIL), yes)
- LIB_EXT=.so
LV2NAME=b_synth
targets+=lv2
@@ -20,9 +19,15 @@ ifeq ($(LV2AVAIL), yes)
UIDEPS=../pugl/pugl.h ../pugl/pugl_internal.h ui_model.h
UIDEPS+=button1.c drawbar.c wood.c dial.c
LV2GUI=b_synthUI
+ ifeq ($(IS_OSX), yes)
+ UILIBS=../pugl/pugl_osx.m -framework Cocoa -framework OpenGL
+ UIDEPS+=../pugl/pugl_osx.m
+ UI_TYPE=CocoaUI
+ else
UILIBS=../pugl/pugl_x11.c -lX11 -lGL -lGLU
UIDEPS+=../pugl/pugl_x11.c
UI_TYPE=X11UI
+ endif
targets+=$(LV2GUI)$(LIB_EXT)
endif
endif
View
@@ -6,7 +6,6 @@ targets=whirl.o eqcomp.o
ifeq ($(LV2AVAIL), yes)
targets+=lv2
- LIB_EXT=.so
LV2NAME=b_whirl
endif
@@ -18,7 +17,7 @@ manifest.ttl:
sed "s/@LV2NAME@/$(LV2NAME)/;s/@LIB_EXT@/$(LIB_EXT)/" manifest.ttl.in > manifest.ttl
$(LV2NAME)$(LIB_EXT): lv2.c whirl.o eqcomp.o whirl.h eqcomp.h ../src/cfgParser.h
- $(CC) -o $(LV2NAME)$(LIB_EXT) $(CFLAGS) -shared -Wl,-Bstatic -Wl,-Bdynamic lv2.c whirl.o eqcomp.o
+ $(CC) -o $(LV2NAME)$(LIB_EXT) $(CFLAGS) -shared $(LV2LDFLAGS) lv2.c whirl.o eqcomp.o
install: $(targets)
ifneq ($(strip $(LV2NAME)),)
View
@@ -42,6 +42,8 @@ UNAME=$(shell uname)
ifeq ($(UNAME),Darwin)
IS_OSX=yes
LV2LDFLAGS=-dynamiclib
+ LIB_EXT=.dylib
else
LV2LDFLAGS=-Wl,-Bstatic -Wl,-Bdynamic
+ LIB_EXT=.so
endif

0 comments on commit aed9aee

Please sign in to comment.