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 -m755 ldid $(DESTDIR)$(BINDIR)/ldid
35 $(LN) -sf ldid $(DESTDIR)$(BINDIR)/ldid2
36 $(INSTALL) -D -m644 docs/ldid.1 $(DESTDIR)$(MANDIR)/man1/ldid.1
37 for lang in $(MANPAGE_LANGS); do \
38 $(INSTALL) -D -m644 docs/ldid.$$lang.1 $(DESTDIR)$(MANDIR)/$$lang/man1/ldid.1; \
44 .PHONY: all clean install