Skip to content

Commit

Permalink
Replace build scripts with Makefiles for faster recompiles
Browse files Browse the repository at this point in the history
  • Loading branch information
irtimmer committed May 7, 2014
1 parent 8edfaf5 commit b9a6f51
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 18 deletions.
4 changes: 0 additions & 4 deletions jni/nv_alsa/build.sh

This file was deleted.

17 changes: 17 additions & 0 deletions jni/nv_alsa/makefile
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions jni/nv_io/build.sh

This file was deleted.

17 changes: 17 additions & 0 deletions jni/nv_io/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CFLAGS = -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux -fPIC -L.
LDFLAGS = -shared -Wl,--no-undefined -L.

SRCS = nv_io_jni.c
TARGET_LIB = libnv_io.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
6 changes: 0 additions & 6 deletions jni/nv_omx_dec/build.sh

This file was deleted.

17 changes: 17 additions & 0 deletions jni/nv_omx_dec/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CFLAGS = -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. -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi
LDFLAGS = -shared -Wl,--no-undefined -L. -L /opt/vc/lib/ -lbcm_host -lopenmaxil -lvcos -lvchiq_arm -lpthread -lrt

SRCS = nv_omx_dec.c nv_omx_dec_jni.c inc/ilclient.c inc/ilcore.c
TARGET_LIB = libnv_omx_dec.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
4 changes: 0 additions & 4 deletions jni/nv_opus_dec/build.sh

This file was deleted.

17 changes: 17 additions & 0 deletions jni/nv_opus_dec/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CFLAGS = -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux -I /usr/include/opus -fPIC -L.
LDFLAGS = -shared -Wl,--no-undefined -lopus -L.

SRCS = nv_opus_dec_jni.c nv_opus_dec.c
TARGET_LIB = libnv_opus_dec.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

0 comments on commit b9a6f51

Please sign in to comment.