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