1################################################################################# 2## Makefile.in for ICU - tools/genrb # 3## Copyright (C) 2016 and later: Unicode, Inc. and others. # 4## License & terms of use: http://www.unicode.org/copyright.html # 5## Copyright (c) 1999-2014, International Business Machines Corporation and # 6## others. All Rights Reserved. # 7################################################################################# 8 9## Source directory information 10srcdir = @srcdir@ 11top_srcdir = @top_srcdir@ 12 13top_builddir = ../.. 14 15include $(top_builddir)/icudefs.mk 16 17## Build directory information 18subdir = tools/genrb 19 20TARGET_STUB_NAME = genrb 21DERB_STUB_NAME = derb 22 23SECTION = 1 24 25MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) 26@ICUIO_TRUE@MAN_FILES += $(DERB_STUB_NAME).$(SECTION) 27 28## Extra files to remove for 'make clean' 29CLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS) 30 31## Target information 32TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT) 33# derb depends on icuio 34@ICUIO_TRUE@DERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT) 35 36CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil -I$(top_srcdir)/io 37CPPFLAGS += -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit 38LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M) 39 40SOURCES = $(shell cat $(srcdir)/sources.txt) 41OBJECTS = $(patsubst %.cpp,%.o,$(patsubst %.c,%.o, $(SOURCES))) 42DERB_SOURCES = derb.cpp 43DERB_OBJ = $(DERB_SOURCES:.cpp=.o) 44 45DEPS = $(OBJECTS:.o=.d) 46DERB_DEPS = $(DERB_OBJ:.o=.d) 47 48-include Makefile.local 49 50## List of phony targets 51.PHONY : all all-local install install-local clean clean-local \ 52distclean distclean-local dist dist-local check check-local install-man 53 54## Clear suffix list 55.SUFFIXES : 56 57## List of standard targets 58all: all-local 59install: install-local 60clean: clean-local 61distclean : distclean-local 62dist: dist-local 63check: all check-local 64 65all-local: $(TARGET) $(DERB) $(MAN_FILES) 66 67install-local: all-local install-man 68 $(MKINSTALLDIRS) $(DESTDIR)$(bindir) 69 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir) 70@ICUIO_TRUE@ $(INSTALL) $(DERB) $(DESTDIR)$(bindir) 71 72install-man: $(MAN_FILES) 73 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION) 74 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION) 75 76dist-local: 77 78clean-local: 79 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) 80 $(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ) 81 82distclean-local: clean-local 83 $(RMV) Makefile 84 85check-local: all-local 86 87Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 88 cd $(top_builddir) \ 89 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 90 91$(TARGET) : $(OBJECTS) 92 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 93 $(POST_BUILD_STEP) 94 95$(DERB) : $(DERB_OBJ) 96 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBICUIO) $(LIBS) 97 $(POST_BUILD_STEP) 98 99# This line is needed to serialize builds when the gmake -j option is used. 100$(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION) 101 102%.$(SECTION): $(srcdir)/%.$(SECTION).in 103 cd $(top_builddir) \ 104 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 105 106 107ifeq (,$(MAKECMDGOALS)) 108-include $(DEPS) 109-include $(DERB_DEPS) 110else 111ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) 112-include $(DEPS) 113endif 114endif 115