Skip to content

Commit

Permalink
Added remaining partial cleans and debug symbols to the partial compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
CalumFreeman committed Aug 30, 2018
1 parent 10d92c1 commit f826e0c
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,18 @@ all: $(OUTPUTDIR) libJyNI libJyNI-Loader JyNI
debug: CFLAGS += -g
debug: all

clean:
rm -rf $(JYNIBIN)
rm -f ./JyNI-C/src/*.o
rm -f ./JyNI-C/src/Python/*.o
rm -f ./JyNI-C/src/Objects/*.o
rm -f ./JyNI-C/src/Modules/*.o
rm -f ./JyNI-Loader/JyNILoader.o

tests: build-tests run-tests

build-tests:
@echo 'building tests is not fully supported yet, this will either not work or install the demo extension as an actuall extension'
@echo 'building tests is not fully supported yet, this will either not work or try to install the demo extension as an actuall extension'
python ./DemoExtension/setup.py install

run-tests:
Expand Down Expand Up @@ -121,12 +129,25 @@ ifeq "$(wildcard $(JAVA_HOME) )" ""
$(eval JAVA_HOME = $(shell $(JAVA) -jar $(JYTHON) -c "from java.lang import System; print System.getProperty('java.home')[:-4]"))
endif

# assume you want debug if you are just compiling one portion of the codebase
libJyNI: CFLAGS += -g
libJyNI: $(JAVA_HOME) $(OBJECTS) JyNI-C/src/Python/dynload_shlib.o
$(CC) $(LDFLAGS) $(OBJECTS) JyNI-C/src/Python/dynload_shlib.o -o $(OUTPUTDIR)/libJyNI.so

cleanC:
rm -f ./JyNI-C/src/*.o
rm -f ./JyNI-C/src/Python/*.o
rm -f ./JyNI-C/src/Objects/*.o
rm -f ./JyNI-C/src/Modules/*.o

# assume you want debug if you are just compiling one portion of the codebase
libJyNI-Loader: CFLAGS += -g
libJyNI-Loader: $(JAVA_HOME) JyNI-Loader/JyNILoader.o
$(CC) $(LDFLAGS) ./JyNI-Loader/JyNILoader.o -o $(OUTPUTDIR)/libJyNI-Loader.so

cleanLoader:
rm -f ./JyNI-Loader/JyNILoader.o

$(JYNIBIN):
mkdir $(JYNIBIN)

Expand All @@ -144,13 +165,5 @@ JyNI: $(JYTHON) $(JYNIBIN)/JyNI $(JYNIBIN)/Lib
cleanJ:
rm -rf $(JYNIBIN)

clean:
rm -rf $(JYNIBIN)
rm -f ./JyNI-C/src/*.o
rm -f ./JyNI-C/src/Python/*.o
rm -f ./JyNI-C/src/Objects/*.o
rm -f ./JyNI-C/src/Modules/*.o
rm -f ./JyNI-Loader/JyNILoader.o

.PHONY: JyNI libJyNI libJyNI-Loader clean cleanJ JAVA_HOME_hint all debug tests run-tests build-tests
.PHONY: JyNI libJyNI libJyNI-Loader clean cleanC cleanLoader cleanJ JAVA_HOME_hint all debug tests run-tests build-tests

0 comments on commit f826e0c

Please sign in to comment.