summaryrefslogtreecommitdiff
path: root/plugins/shn
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/shn')
-rw-r--r--plugins/shn/Makefile23
-rw-r--r--plugins/shn/Makefile.am10
-rw-r--r--plugins/shn/shn.c2
-rw-r--r--plugins/shn/shn.h2
4 files changed, 12 insertions, 25 deletions
diff --git a/plugins/shn/Makefile b/plugins/shn/Makefile
deleted file mode 100644
index d76c8427..00000000
--- a/plugins/shn/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-OUT=ddb_shn.so
-
-CC?=gcc
-
-CFLAGS?=-I../..
-CFLAGS+=-Wall -fPIC -std=c99 -D_GNU_SOURCE -DHAVE_CONFIG_H -I.
-
-LDFLAGS+=-module -shared -lm
-
-SOURCES=array.c convert.c misc.c output.c seek.c shn.c shorten.c sulawalaw.c vario.c wave.c
-
-OBJECTS=$(SOURCES:.c=.o)
-
-all: $(SOURCES) $(OUT)
-
-$(OUT): $(OBJECTS)
- $(CC) $(LDFLAGS) $(OBJECTS) -o $@
-
-.c.o:
- $(CC) $(CFLAGS) $< -c -o $@
-
-clean:
- rm $(OBJECTS) $(OUT)
diff --git a/plugins/shn/Makefile.am b/plugins/shn/Makefile.am
new file mode 100644
index 00000000..acc597ef
--- /dev/null
+++ b/plugins/shn/Makefile.am
@@ -0,0 +1,10 @@
+if HAVE_SHN
+shndir = $(libdir)/$(PACKAGE)
+pkglib_LTLIBRARIES = ddb_shn.la
+ddb_shn_la_SOURCES = array.c convert.c misc.c output.c seek.c shn.c shn.h shorten.c shorten.h sulawalaw.c vario.c wave.c bitshift.h
+
+ddb_shn_la_LDFLAGS = -module
+
+ddb_shn_la_LIBADD = $(LDADD) -lm
+AM_CFLAGS = $(CFLAGS) -std=c99
+endif
diff --git a/plugins/shn/shn.c b/plugins/shn/shn.c
index 504f283c..c9d4acaf 100644
--- a/plugins/shn/shn.c
+++ b/plugins/shn/shn.c
@@ -23,7 +23,7 @@
#include <stdlib.h>
#include <math.h>
#include "shorten.h"
-#include <deadbeef/deadbeef.h>
+#include "../../deadbeef.h"
#include "bitshift.h"
//#define trace(...) { fprintf(stderr, __VA_ARGS__); }
diff --git a/plugins/shn/shn.h b/plugins/shn/shn.h
index e7d3bba8..518334bc 100644
--- a/plugins/shn/shn.h
+++ b/plugins/shn/shn.h
@@ -28,7 +28,7 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>
-#include <deadbeef/deadbeef.h>
+#include "../../deadbeef.h"
extern DB_functions_t *deadbeef;