Skip to content

Commit

Permalink
Merge pull request #183 from sergiomb2/master
Browse files Browse the repository at this point in the history
It uses the same code style for install man and add uninstall rule
  • Loading branch information
kornelski committed Jan 21, 2016
2 parents a8fa3e6 + 47f0594 commit 34ba88e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ $(TESTBIN): test/test.o $(STATICLIB)
test: $(BIN) $(TESTBIN)
./test/test.sh ./test $(BIN) $(TESTBIN)

bin.shared: $(OBJS) $(SHAREDLIB)
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $(BIN)

testbin.shared: test/test.o $(SHAREDLIB)
$(CC) $^ $(CFLAGS) $(LDFLAGS) -o $(TESTBIN)

test.shared: bin.shared testbin.shared
./test/test.sh ./test $(BIN) $(TESTBIN)

dist: $(TARFILE)

$(TARFILE): $(DISTFILES)
Expand All @@ -63,14 +72,15 @@ $(TARFILE): $(DISTFILES)
rm -rf $(TARNAME)
-shasum $(TARFILE)

install: $(BIN) pngquant.1
install: $(BIN) $(BIN).1
-mkdir -p '$(BINPREFIX)'
-mkdir -p '$(MANPREFIX)/man1'
install -m 0755 -p '$(BIN)' '$(BINPREFIX)/$(BIN)'
cp pngquant.1 '$(MANPREFIX)/man1/'
install -m 0644 -p '$(BIN).1' '$(MANPREFIX)/man1/'

uninstall:
rm -f '$(BINPREFIX)/$(BIN)'
rm -f '$(MANPREFIX)/man1/$(BIN).1'

clean:
$(MAKE) -C lib clean
Expand Down

0 comments on commit 34ba88e

Please sign in to comment.