comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:db63d01a23c6
1 CXX = g++
2 CXXFLAGS = -I$(JRE_HOME)/include -I$(JRE_HOME)/include/darwin \
3 -I$(EXIV2_HOME)/include -I$(EXIV2_HOME)/build
4 NDIR = src/name/blackcap/exifwasher/exiv2
5 BDIR = src/name/blackcap/exifwasher/binaries/mac
6
7 .PHONY: all checkenv
8
9 all: checkenv $(BDIR)/libjni.dylib $(BDIR)/libexiv2.dylib
10
11 checkenv:
12 @if [ -z "$(JRE_HOME)" -o -z "$(EXIV2_HOME)" ]; then \
13 1>&2 echo "JRE_HOME or EXIV2_HOME not set"; \
14 exit 1; \
15 fi
16
17 $(NDIR)/native.o: $(NDIR)/native.cpp
18
19 $(BDIR)/libjni.dylib: $(NDIR)/native.o
20 $(CXX) -dynamiclib -o $@ $< -L$(EXIV2_HOME)/build/lib -lexiv2
21
22 $(BDIR)/libexiv2.dylib: $(EXIV2_HOME)/build/lib/libexiv2.dylib
23 cp -fp $< $@