Skip to content

Commit

Permalink
Tweak Makefile (no build libpasta by default).
Browse files Browse the repository at this point in the history
  • Loading branch information
samscott89 committed Dec 15, 2017
1 parent e19ea17 commit ba8b401
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ java: OUTPUT_NAME = libpasta_jni.so
javascript: CC = g++
python: OUTPUT_NAME = _pasta.so

$(targets): libpasta pasta.i
$(targets): pasta.i
mkdir -p $@/$(OUTPUT_DIR)
$(SWIG) -$@ $($@_SWIG_ARGS) -outdir $@ -o $@/pasta_wrap.c pasta.i
$(CC) $(CC_OPTS) $@/pasta_wrap.c -fPIC -c -g $($@_INCLUDES) -o $@/pasta_wrap.o
make libpasta
ifdef USE_STATIC
$(CC) $(CC_OPTS) -static-libgcc -shared $@/pasta_wrap.o $(STATIC_LIBPASTA) -L/usr/lib/ $(NATIVE_LIBS) -o $@/$(OUTPUT_DIR)/$(OUTPUT_NAME)
else
Expand All @@ -56,7 +55,6 @@ test: all
make -C tests/ c $(targets)

libpasta-sync:

ifneq ($(shell git -C libpasta/ rev-parse --abbrev-ref HEAD),master)
git submodule update --init --recursive
cd libpasta && git fetch && git checkout origin/master
Expand All @@ -65,7 +63,7 @@ endif
libpasta/build/libpasta.%:
make -C libpasta $(@F)

libpasta: libpasta/build/libpasta.a libpasta/build/libpasta.so
libpasta: libpasta-sync libpasta/build/libpasta.a libpasta/build/libpasta.so
ifndef USE_STATIC
make -C libpasta install
endif
Expand Down

0 comments on commit ba8b401

Please sign in to comment.