Replace build scripts with Makefiles for faster recompiles

This commit is contained in:
Iwan Timmer
2014-05-07 21:56:57 +02:00
parent 8edfaf5a31
commit b9a6f5162f
8 changed files with 68 additions and 18 deletions
-4
View File
@@ -1,4 +0,0 @@
rm *.o libnv_alsa.so
gcc -I $JAVA_HOME/include -I $JAVA_HOME/include/linux -I /opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I ./inc -fPIC -L. -c *.c
gcc -shared -Wl,-soname,libnv_alsa.so -Wl,--no-undefined -o libnv_alsa.so *.o -L. -lasound
rm *.o
+17
View File
@@ -0,0 +1,17 @@
CFLAGS = -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux -fPIC -L.
LDFLAGS = -shared -Wl,--no-undefined -L. -lasound
SRCS = nv_alsa.c nv_alsa_jni.c
TARGET_LIB = libnv_alsa.so
OBJS = $(SRCS:.c=.o)
$(TARGET_LIB): $(OBJS)
$(CC) ${LDFLAGS} -o $@ $^
all: $(TARGET_LIB)
clean:
rm -f ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d)
.PHONY: all clean