Home | History | Annotate | Download | only in config
      1 ## -*-makefile-*-
      2 ## Linux-specific setup for Visual Age
      3 ## Copyright (c) 2003-2010, International Business Machines Corporation and
      4 ## others. All Rights Reserved.
      5 
      6 ## Commands to generate dependency files
      7 GEN_DEPS.c=  $(CC) -E -MM $(DEFS) $(CPPFLAGS)
      8 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
      9 
     10 # -qroconst make the strings readonly, which is usually the default.
     11 #           This helps in the data library,
     12 # -qproto assumes all functions are prototyped (for optimization)
     13 CFLAGS += -qproto -qroconst
     14 CXXFLAGS += -qproto -qroconst
     15 
     16 GENCCODE_ASSEMBLY=-a gcc
     17 ## Flags for position independent code
     18 SHAREDLIBCFLAGS = -qpic=large
     19 SHAREDLIBCXXFLAGS = -qpic=large
     20 SHAREDLIBCPPFLAGS = -DPIC
     21 
     22 ## Additional flags when building libraries and with threads
     23 THREADSCPPFLAGS = -D_REENTRANT
     24 LIBCPPFLAGS =
     25 
     26 ## Compiler switch to embed a runtime search path
     27 LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN 
     28 #LD_RPATH_PRE = -Wl,-rpath,
     29 
     30 ## Compiler switch to embed a library name
     31 # The initial tab in the next line is to prevent icu-config from reading it.
     32 	LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
     33 #SH# # We can't depend on MIDDLE_SO_TARGET being set.
     34 #SH# LD_SONAME=
     35 
     36 ## The type of assembly needed when pkgdata is used for generating shared libraries.
     37 GENCCODE_ASSEMBLY=-a gcc
     38 
     39 ## Shared object suffix
     40 SO = so
     41 ## Non-shared intermediate object suffix
     42 STATIC_O = ao
     43 
     44 ## Override the default mechanism for building shared objects
     45 SHLIB.c=      $(CC)  $(CFLAGS)   -qmkshrobj -qpic=large -G $(LDFLAGS) 
     46 SHLIB.cc=     $(CXX) $(CXXFLAGS) -qmkshrobj -qpic=large -G $(LDFLAGS)
     47 
     48 ## Compilation rules
     49 %.$(STATIC_O): $(srcdir)/%.c
     50 	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
     51 %.o: $(srcdir)/%.c
     52 	$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
     53 
     54 %.$(STATIC_O): $(srcdir)/%.cpp
     55 	$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
     56 %.o: $(srcdir)/%.cpp
     57 	$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
     58 
     59 
     60 ## Dependency rules
     61 %.d: $(srcdir)/%.c
     62 	@echo "generating dependency information for $<"
     63 	@$(SHELL) -ec '$(GEN_DEPS.c) $< > /dev/null'
     64 
     65 %.d: $(srcdir)/%.cpp
     66 	@echo "generating dependency information for $<"
     67 	@$(SHELL) -ec '$(GEN_DEPS.cc) $< > /dev/null'
     68 
     69 ## Versioned libraries rules
     70 
     71 %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
     72 	$(RM) $@ && ln -s ${<F} $@
     73 %.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
     74 	$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
     75 
     76 ## End Linux-specific setup
     77 
     78