Mercurial > cgi-bin > hgweb.cgi > JpegWasher
diff Makefile.mac @ 0:db63d01a23c6
JNI calls and test case (finally!) seem to work.
author | David Barts <n5jrn@me.com> |
---|---|
date | Tue, 31 Mar 2020 13:24:48 -0700 |
parents | |
children | 89d7f4d91f67 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.mac Tue Mar 31 13:24:48 2020 -0700 @@ -0,0 +1,23 @@ +CXX = g++ +CXXFLAGS = -I$(JRE_HOME)/include -I$(JRE_HOME)/include/darwin \ + -I$(EXIV2_HOME)/include -I$(EXIV2_HOME)/build +NDIR = src/name/blackcap/exifwasher/exiv2 +BDIR = src/name/blackcap/exifwasher/binaries/mac + +.PHONY: all checkenv + +all: checkenv $(BDIR)/libjni.dylib $(BDIR)/libexiv2.dylib + +checkenv: + @if [ -z "$(JRE_HOME)" -o -z "$(EXIV2_HOME)" ]; then \ + 1>&2 echo "JRE_HOME or EXIV2_HOME not set"; \ + exit 1; \ + fi + +$(NDIR)/native.o: $(NDIR)/native.cpp + +$(BDIR)/libjni.dylib: $(NDIR)/native.o + $(CXX) -dynamiclib -o $@ $< -L$(EXIV2_HOME)/build/lib -lexiv2 + +$(BDIR)/libexiv2.dylib: $(EXIV2_HOME)/build/lib/libexiv2.dylib + cp -fp $< $@