# TOVE top-level makefile
# Author: Timo Pärnänen

# The name of the switch side executable
#TARGET = toveswitch

# Switch side object files on the top level
#OBJS = tovemain.o

# FSR definitions. Use the empty ones, if you don't have FSR API
# installed into your system.
#
#FSR_DEFS = -DHAVE_FSR
#LINK_FSR = -lfsr
FSR_DEFS =
LINK_FSR =
VE_FSR_OBJS =

# Subdirs that contain necessary modules
SUBDIRS = $(TOVESRC)/sf \
	$(TOVESRC)/pf \
	$(TOVESRC)/common \
	$(TOVESRC)/iface/naalif \
	$(TOVESRC)/iface/uaalif \
	$(TOVESRC)/iface/aaif \
	$(TOVESRC)/iface/sigif \
	$(TOVESRC)/iface/cpcsif \
	$(TOVESRC)/iface/binapif \
	$(TOVESRC)/iface/mtpif \
	$(TOVESRC)/iface/sccpif \
	$(TOVESRC)/protocol/cpcs \
	$(TOVESRC)/protocol/sscop \
	$(TOVESRC)/protocol/nsscf \
	$(TOVESRC)/protocol/usscf \
	$(TOVESRC)/protocol/saal \
	$(TOVESRC)/protocol/uni \
	$(TOVESRC)/protocol/cc \
	$(TOVESRC)/protocol/mtp3 \
	$(TOVESRC)/protocol/sccp \
	$(TOVESRC)/protocol/tcap \
	$(TOVESRC)/protocol/gsmp \
	$(TOVESRC)/protocol/ilmi/asn \
	$(TOVESRC)/protocol/ilmi \
	$(TOVESRC)/protocol/bisup \
	$(TOVESRC)/protocol/sig \
	$(TOVESRC)/ie \
	$(TOVESRC)/mib \
	$(TOVESRC)/sw \
	$(TOVESRC)/mgmt \
	$(TOVESRC)/testing/ORBdemo \
	$(TOVESRC)/testing/cc \
	$(TOVESRC)/testing/gsmp \
	$(TOVESRC)/testing/ilmi \
	$(TOVESRC)/testing/mgmtswitch \
	$(TOVESRC)/testing/mib \
	$(TOVESRC)/testing/mtp3 \
	$(TOVESRC)/testing/newpf \
	$(TOVESRC)/testing/pf \
	$(TOVESRC)/testing/saal \
	$(TOVESRC)/testing/ss7 \
	$(TOVESRC)/testing/sscop \
	$(TOVESRC)/testing/tcap \
	$(TOVESRC)/testing/uni \
	$(TOVESRC)/testing/pducoder \
	$(TOVESRC)/testing/bisup \
	$(TOVESRC)/testing/sw

ALL_SUBDIRS = $(SUBDIRS)

#MODULEFILES = 

IDLDIRS = $(TOVESRC)/protocol/tcap \
	$(TOVESRC)/protocol/cc \
	$(TOVESRC)/testing/ORBdemo \
	$(TOVESRC)/testing/sscop \
	$(TOVESRC)/mgmt
 
include $(TOVESRC)/Rules.Make


# Do make in all switch subdirs, link the executable
#$(TARGET) : $(OBJS)
all :
	for i in $(SUBDIRS); do nice -19 $(MAKE) -C $$i; done
#	$(CC) $(CCFLAGS) $(INC_DIRS) -o $(TARGET) $(OBJS) $(MODULEFILES) \
#	$(LINK_FSR) $(ORBLIB) $(NAMELIB) $(ASN1_LIB)

# Clean both targets
clean:
	rm -rf *~ *.o core $(TARGET)

# Make clean in all subdirs and in top level
# ('make clean' clears only top level)
deepclean:
	for i in . $(ALL_SUBDIRS); do $(MAKE) -C $$i clean; done

# Make dependencies in all subdirs and in top level
# ('make dep' make dependencies only in top level)
deepdep:
	for i in . $(ALL_SUBDIRS); do $(MAKE) -C $$i dep; done
	makedepend -Y $(INC_DIRS) $(DEFS) *.cpp 2> /dev/null

# Make corba skeletons and stubs in all subdirs with idl interfaces 
deepidl:
	for i in $(IDLDIRS); do $(MAKE) -C $$i idl; done

# Dependencies are below. The next line is used by makedepend, so
# DO NOT DELETE
