summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>1998-09-22 21:03:47 +0000
committerSteve Huston <shuston@riverace.com>1998-09-22 21:03:47 +0000
commit224770df7da45f841106c031e4f4993d1bb78078 (patch)
tree86447258dcb8e77a3b987a694e570bf4ca0fb848
parent1c1adb7754f8965462794c3205262e2eda3b636b (diff)
downloadATCD-224770df7da45f841106c031e4f4993d1bb78078.tar.gz
envinfo only builds if "envinfo=1" is specified on make command line.
-rw-r--r--bin/Makefile42
1 files changed, 39 insertions, 3 deletions
diff --git a/bin/Makefile b/bin/Makefile
index b3bebc0db24..4af39ba9094 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -3,15 +3,22 @@
# $Id$
#
# Makefile for all the ACE binaries
+#
+# This Makefile can build clone and envinfo, but not both at the same time.
+# clone must not use any ACE pieces, since it's building a clone of the source
+# tree and it can't have done a build yet. envinfo, on the other hand,
+# requires a built ACE to build correctly.
+# This Makefile is distributed so as to be able to build clone without
+# changes. To build envinfo, first build ACE, then come back and do a
+# make envinfo=1
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Local macros
#----------------------------------------------------------------------------
-BIN = \
- clone \
- envinfo \
+ifdef envinfo
+BIN = envinfo
LSRC = $(addsuffix .cpp,$(BIN))
VLDLIBS = $(LDLIBS:%=%$(VAR))
@@ -36,6 +43,35 @@ ifdef TEMPINCDIR
COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc)
endif
+else # Not building envinfo
+
+include $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
+
+CFILES = clone.cpp
+OFILES = clone.o
+DFLAGS = -b elf
+CCFLAGS += -I$(ACE_ROOT)
+
+#############################################################################
+# C++ directives
+
+.SUFFIXES: .cpp
+.cpp.o:
+ $(CXX) $(CCFLAGS) -c $<
+#############################################################################
+
+clone: $(OFILES)
+ $(CXX) $(CCFLAGS) -o $@ $(OFILES)
+
+clean:
+ -/bin/rm -f *.o *.out *~ core
+
+realclean: clean
+ -/bin/rm -fr clone
+
+endif # envinfo
+
+
#----------------------------------------------------------------------------
# Local targets
#----------------------------------------------------------------------------