9 CXXFLAGS ?= $(CFLAGS) -std=c++11
14 BINDIR ?= $(PREFIX)/bin
15 MANDIR ?= $(PREFIX)/share/man
17 SRC := $(wildcard *.c) $(wildcard *.cpp)
18 LIBS ?= -lcrypto -lplist-2.0
20 MANPAGE_LANGS := zh_TW zh_CN
25 $(CC) -c $(CFLAGS) $(CPPFLAGS) -I. $< -o $@
28 $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -I. -DLDID_VERSION=\"$(VERSION)\" $< -o $@
31 $(CXX) $(CXXFLAGS) -o ldid $^ $(LDFLAGS) $(LIBS)
34 $(INSTALL) -d $(DESTDIR)$(BINDIR)/
35 $(INSTALL) -m755 ldid $(DESTDIR)$(BINDIR)/ldid
36 $(LN) -sf ldid $(DESTDIR)$(BINDIR)/ldid2
37 $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1/
38 $(INSTALL) -m644 docs/ldid.1 $(DESTDIR)$(MANDIR)/man1/ldid.1
39 for lang in $(MANPAGE_LANGS); do \
40 $(INSTALL) -d $(DESTDIR)$(MANDIR)/$$lang/man1/; \
41 $(INSTALL) -m644 docs/ldid.$$lang.1 $(DESTDIR)$(MANDIR)/$$lang/man1/ldid.1; \
47 .PHONY: all clean install