Home | History | Annotate | Download | only in genrb
      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
     10 srcdir = @srcdir@
     11 top_srcdir = @top_srcdir@
     12 
     13 top_builddir = ../..
     14 
     15 include $(top_builddir)/icudefs.mk
     16 
     17 ## Build directory information
     18 subdir = tools/genrb
     19 
     20 TARGET_STUB_NAME = genrb
     21 DERB_STUB_NAME = derb
     22 
     23 SECTION = 1
     24 
     25 MAN_FILES = $(TARGET_STUB_NAME).$(SECTION)
     26 @ICUIO_TRUE@MAN_FILES += $(DERB_STUB_NAME).$(SECTION)
     27 
     28 ## Extra files to remove for 'make clean'
     29 CLEANFILES = *~ $(MAN_FILES) $(DEPS) $(DERB_DEPS)
     30 
     31 ## Target information
     32 TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
     33 # derb depends on icuio
     34 @ICUIO_TRUE@DERB = $(BINDIR)/$(DERB_STUB_NAME)$(EXEEXT)
     35 
     36 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil -I$(top_srcdir)/io
     37 CPPFLAGS += -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit
     38 LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
     39 
     40 OBJECTS = errmsg.o genrb.o parse.o read.o reslist.o ustr.o rbutil.o \
     41 wrtjava.o rle.o wrtxml.o prscmnts.o
     42 DERB_OBJ = derb.o
     43 
     44 DEPS = $(OBJECTS:.o=.d)
     45 DERB_DEPS = $(DERB_OBJ:.o=.d)
     46 
     47 -include Makefile.local
     48 
     49 ## List of phony targets
     50 .PHONY : all all-local install install-local clean clean-local	\
     51 distclean distclean-local dist dist-local check check-local install-man
     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 
     64 all-local: $(TARGET) $(DERB) $(MAN_FILES)
     65 
     66 install-local: all-local install-man
     67 	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
     68 	$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
     69 @ICUIO_TRUE@	$(INSTALL) $(DERB) $(DESTDIR)$(bindir)
     70 
     71 install-man: $(MAN_FILES)
     72 	$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
     73 	$(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
     74 
     75 dist-local:
     76 
     77 clean-local:
     78 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
     79 	$(RMV) $(TARGET) $(DERB) $(OBJECTS) $(DERB_OBJ)
     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)
     91 	$(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
     92 	$(POST_BUILD_STEP)
     93 
     94 $(DERB) : $(DERB_OBJ)
     95 	$(LINK.cc) $(OUTOPT)$@ $^ $(LIBICUIO) $(LIBS)
     96 	$(POST_BUILD_STEP)
     97 
     98 # This line is needed to serialize builds when the gmake -j option is used.
     99 $(TARGET_STUB_NAME).$(SECTION): $(DERB_STUB_NAME).$(SECTION)
    100 
    101 %.$(SECTION): $(srcdir)/%.$(SECTION).in
    102 	cd $(top_builddir) \
    103 	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
    104 
    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
    114