Trying the 3.35 commit again (SIMPLE_PROGRAMS)

This commit is contained in:
mcafee%netscape.com 1999-01-23 11:41:15 +00:00
Родитель 9c81f51d53
Коммит 309efea40d
1 изменённых файлов: 42 добавлений и 2 удалений

Просмотреть файл

@ -43,6 +43,9 @@
# d)
# PROGRAM -- the target program name to create from $OBJS
# ($OBJDIR automatically prepended to it)
# d2)
# SIMPLE_PROGRAMS -- Compiles Foo.cpp Bar.cpp into Foo, Bar executables.
# ($OBJDIR automatically prepended to it)
# e)
# LIBRARY_NAME -- the target library name to create from $OBJS
# ($OBJDIR automatically prepended to it)
@ -81,6 +84,10 @@ ifdef PROGRAM
PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM))
endif
ifdef SIMPLE_PROGRAMS
SIMPLE_PROGRAMS := $(addprefix $(OBJDIR)/, $(SIMPLE_PROGRAMS))
endif
#
# Library rules
#
@ -141,7 +148,7 @@ DLL_SUFFIX = a
endif
ifndef TARGETS
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
endif
ifndef OBJS
@ -299,7 +306,7 @@ export::
+$(LOOP_OVER_DIRS)
ifndef LIBS_NEQ_INSTALL
libs install:: $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(MAPS)
libs install:: $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(MAPS)
ifndef NO_STATIC_LIB
ifdef LIBRARY
$(INSTALL) -m 444 $(LIBRARY) $(DIST)/lib
@ -313,6 +320,9 @@ ifdef SHARED_LIBRARY
endif
ifdef PROGRAM
$(INSTALL) -m 444 $(PROGRAM) $(DIST)/bin
endif
ifdef SIMPLE_PROGRAMS
$(INSTALL) -m 444 $(SIMPLE_PROGRAMS) $(DIST)/bin
endif
+$(LOOP_OVER_DIRS)
else
@ -333,6 +343,9 @@ ifdef MAPS
endif
ifdef PROGRAM
$(INSTALL) -m 444 $(PROGRAM) $(DIST)/bin
endif
ifdef SIMPLE_PROGRAMS
$(INSTALL) -m 444 $(SIMPLE_PROGRAMS) $(DIST)/bin
endif
+$(LOOP_OVER_DIRS)
endif
@ -349,6 +362,19 @@ alltags:
rm -f TAGS
find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
#
# Define LINK_LINE here, since it gets used in two places.
#
ifdef CPP_PROG_LINK
LINK_LINE = $(CCC) $(CFLAGS) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
else
LINK_LINE = $(CCF) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
endif
#
# PROGRAM = Foo
# creates OBJS, links with LIBS to create Foo
#
$(PROGRAM): $(PROGOBJS)
@$(MAKE_OBJDIR)
ifeq ($(OS_ARCH),OS2)
@ -365,6 +391,20 @@ endif
endif
endif
#
# This is an attempt to support generation of multiple binaries
# in one directory, it assumes everything to compile Foo is in
# Foo.o (from either Foo.c or Foo.cpp).
#
# SIMPLE_PROGRAMS = Foo Bar
# creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
#
#
$(SIMPLE_PROGRAMS):$(OBJDIR)/%: $(OBJDIR)/%.o
@$(MAKE_OBJDIR)
ifneq ($(OS_ARCH),OS2)
$(LIBRARY): $(OBJS) $(LOBJS)
@$(MAKE_OBJDIR)