diff options
Diffstat (limited to 'include/makeinclude/rules.lib.GNU')
-rw-r--r-- | include/makeinclude/rules.lib.GNU | 78 |
1 files changed, 51 insertions, 27 deletions
diff --git a/include/makeinclude/rules.lib.GNU b/include/makeinclude/rules.lib.GNU index 14b8ea5e2e2..73af29f84fe 100644 --- a/include/makeinclude/rules.lib.GNU +++ b/include/makeinclude/rules.lib.GNU @@ -11,33 +11,32 @@ #---------------------------------------------------------------------------- ifndef OBJEXT - OBJEXT=o +OBJEXT=o endif ifndef SOEXT - SOEXT=so +SOEXT=so endif VSHLIB = $(SHLIB:%.$(SOEXT)=%$(VAR).$(SOEXT)) VLOBJS = $(subst .cpp,.$(OBJEXT),$(foreach file,$(LSRC),$(VDIR)$(notdir $(file)))) ifdef TEMPINCDIR - VSHOBJS1 = -else # ! TEMPINCDIR - LSRC += $(LSRC2) +VSHOBJS1 = +else +LSRC += $(LSRC2) ifdef PRELIB ifdef PRELIB_USES_OBJ_ONLY - VSHOBJS = $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) -else # ! PRELIB_USES_OBJ_ONLY - VSHOBJS = $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) -endif # ! PRELIB_USES_OBJ_ONLY - VSHOBJS1 = $(VSHOBJS) -else # ! PRELIB - VSHOBJS = $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) - VSHOBJS1 = \ - $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) -endif # ! PRELIB -endif # ! TEMPINCDIR +VSHOBJS = $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) +else +VSHOBJS = $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) +endif +VSHOBJS1 = $(VSHOBJS) +else +VSHOBJS = $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) +VSHOBJS1 = $(subst .cpp,.o,$(foreach file,$(LSRC),$(VSHDIR)$(notdir $(file)))) +endif +endif # Comment out for now... # $(DEFS:%=$(INSINC)/%) \ @@ -83,19 +82,46 @@ ifdef PRELIB endif $(AR) $(ARFLAGS) $@ $? ifdef TEMPINCDIR -# This is required to get AIX xlC to instantiate and compile the needed -# templates. - if test -s ./$(TEMPINCDIR)/*.C; \ - then \ - $(LINK.cc) -o dummy $(LDFLAGS) $(ACE_ROOT)/etc/xlc_dummy.cpp $@ $(LIBS); \ - $(RM) dummy; \ - $(AR) $(ARFLAGS) $@ tempinc/*.o; \ +# This is required for AIX!!! + if test -e xxx; \ + then \ + rm xxx; \ fi + (if test -s ./$(TEMPINCDIR)/*.C; \ + then \ + while ! test -e xxx; \ + do \ + touch xxx; \ + cd ./$(TEMPINCDIR); \ + for temp in *.C; \ + do \ + if ! test -d ./$(TEMPINCDIR); \ + then \ + cd ..; \ + fi; \ + if $(COMPILE.cc) -o $(VDIR)$$temp.o ./$(TEMPINCDIR)/$$temp; \ + then \ + $(AR) $(ARFLAGS) $@ $(VDIR)$$temp.o;\ + else \ + rm $@; \ + rm xxx; \ + exit; \ + fi \ + done; \ + for temp in ./$(TEMPINCDIR)/*.C; \ + do \ + if test $$temp -nt xxx; \ + then \ + rm xxx; \ + break; \ + fi \ + done \ + done; \ + fi) + rm xxx endif -chmod a+r $@ -ifneq (,$(RANLIB)) -$(RANLIB) $@ -endif # RANLIB # Note that if you don't want to build shared libraries, just remove the $(VSHOBJS) ifdef SHLIBBUILD @@ -117,7 +143,5 @@ ifdef SHLIBA $(SHLIBA): $(VSHLIB) $(AR) $(ARFLAGS) $@ $? -chmod a+rx $@ -ifneq (,$(RANLIB)) -$(RANLIB) $@ -endif # RANLIB endif |