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