Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
Fixes #107
  • Loading branch information
kornelski committed May 4, 2023
1 parent 37f5a8a commit 5935659
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions imagequant-sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ static: $(STATICLIB)

java: $(JNILIB)

target:: Cargo.toml
$(STATICLIB): Cargo.toml
cargo build --release

$(STATICLIB): target
cp target/release/$(STATICLIB) $(STATICLIB)
cp ../target/release/libimagequant_sys.a $(STATICLIB)

$(JNILIB): $(JAVAHEADERS) $(STATICLIB) org/pngquant/PngQuant.c
$(CC) -g $(CFLAGS) $(LDFLAGS) $(JAVAINCLUDE) -shared -o $@ org/pngquant/PngQuant.c $(STATICLIB)
Expand All @@ -49,7 +47,7 @@ lodepng.c:
clean:
rm -f $(SHAREDLIBVER) $(SHAREDLIB) $(STATICLIB)
rm -f $(JAVAHEADERS) $(JAVACLASSES) $(JNILIB) example
rm -rf target
rm -rf ../target

distclean: clean
rm -f imagequant.pc
Expand All @@ -71,5 +69,5 @@ uninstall:
$(PKGCONFIG): Cargo.toml
sed 's|@PREFIX@|$(PREFIX)|;s|@VERSION@|$(VERSION)|' < imagequant.pc.in > $(PKGCONFIG)

.PHONY: all static clean distclean java target
.PHONY: all static clean distclean java
.DELETE_ON_ERROR:

0 comments on commit 5935659

Please sign in to comment.