#===========================================================================
#
# OPUS/SHARE Makefile
#
# author: Scott Binegar
#
# This file goes in both the src/libs and src/apps directories.
# It calls either all of the .make files or just the .make file for a
# particular target.  In the following examples, the command follows
# the explaination and is preceeded by the % (prompt).
#
# Examples:
#
# To build all files in the directory just type the command:
#	% gmake 
# 
# To only build one specific application (like oapi) type the command:
#	% gmake oapi
#
# To delete files generated for one specific application (like oapi):
#	% gmake oapi.clean
#
# History:
# 12/23/09  64182  MSwam     changes for Linux
#===========================================================================
# Delete implicit rules
.SUFFIXES:

ifndef TOPDIR
        TOPDIR:=$(shell pwd | sed -e 's?/src.*??')
endif

MAKE+= -I $(TOPDIR)/src --no-print-directory 

# Determine the operating system
include $(SHAREROOT)/platform.defs


# Include the individual application makefiles
# The OPUS corba files should be built first
#
target_files := $(wildcard *.make)
targets := $(basename $(target_files))

# Stop building Testjfof_cpp since it is not used
targets := $(filter-out Testjfof_cpp, $(targets))

all : $(targets)

$(targets) : FORCE
	@$(MAKE) -f $@.make

FORCE:

%.clean : %.make
	@$(MAKE) -f $< clean

include $(TOPDIR)/src/Makeopus.include

