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