# Makefile for switch testing module
#
# Author: Timo Pärnänen

# This is the name of the executable
TARGET = switchtest

# Object files
OBJS = switchtestimpl.o \
	switchtestmain.o

# Subdirs that contain necessary modules
SUBDIRS = $(TOVESRC)/sf \
	$(TOVESRC)/pf \
	$(TOVESRC)/common \
	$(TOVESRC)/trace \
        $(TOVESRC)/switch \
        $(TOVESRC)/protocol/gsmp \
        $(TOVESRC)/protocol/uni \
        $(TOVESRC)/codec \
        $(TOVESRC)/protocol/cc \
        $(TOVESRC)/iface/sigif \
        $(TOVESRC)/iface/binapif \
	$(TOVESRC)/iface/naalif \
	$(TOVESRC)/iface/uaalif \
	$(TOVESRC)/iface/aaif \
	$(TOVESRC)/iface/cpcsif \
	$(TOVESRC)/protocol/cpcs \
	$(TOVESRC)/protocol/sscop \
	$(TOVESRC)/protocol/nsscf \
	$(TOVESRC)/protocol/usscf \
	$(TOVESRC)/protocol/saal \
	$(TOVESRC)/mib \
	$(TOVESRC)/mgmt \
	$(TOVESRC)/protocol/ilmi/asn \
	$(TOVESRC)/protocol/ilmi
	

ALL_SUBDIRS = $(SUBDIRS)

# Names of the modules to be linked to the binary
MODULEFILES = $(TOVESRC)/protocol/ilmi/ilmi.a \
	$(TOVESRC)/protocol/ilmi/asn/ilmiasn.a \
	$(TOVESRC)/mgmt/mgmt.a \
	$(TOVESRC)/mib/mib.a \
	$(TOVESRC)/protocol/saal/saal.a \
        $(TOVESRC)/protocol/cpcs/cpcs.a \
        $(TOVESRC)/protocol/sscop/sscop.a \
        $(TOVESRC)/protocol/nsscf/nsscf.a \
        $(TOVESRC)/protocol/usscf/usscf.a \
        $(TOVESRC)/switch/switch.a \
        $(TOVESRC)/protocol/gsmp/gsmp.a \
        $(TOVESRC)/protocol/uni/uni.a \
        $(TOVESRC)/codec/codec.a \
        $(TOVESRC)/protocol/cc/cc.a \
        $(TOVESRC)/iface/sigif/sigif.a \
        $(TOVESRC)/iface/binapif/binapif.a \
	$(TOVESRC)/protocol/saal/saal.a \
        $(TOVESRC)/iface/cpcsif/cpcsif.a \
	$(TOVESRC)/iface/aaif/aaif.a \
	$(TOVESRC)/iface/uaalif/uaalif.a \
	$(TOVESRC)/iface/naalif/naalif.a \
	$(TOVESRC)/trace/trace.a \
	$(TOVESRC)/common/common.a \
	$(TOVESRC)/pf/pf.a \
	$(TOVESRC)/sf/sf.a

# include a Rules file
include $(TOVESRC)/Rules.Make

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

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
	rm -rf *~ *.o $(TARGET)


# 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


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

switchtestimpl.o: switchtestimpl.h
switchtestimpl.o: /slave/users/parnanen/src/mgmt/mgmtdelegationbase.h
switchtestimpl.o: /slave/users/parnanen/src/pf/types.h
switchtestimpl.o: /slave/users/parnanen/src/mgmt/mgmtcommand.h
switchtestimpl.o: /slave/users/parnanen/src/mgmt/toveswitch.h
switchtestimpl.o: /slave/users/parnanen/src/pf/debug.h
switchtestimpl.o: /slave/users/parnanen/src/pf/system.h
switchtestimpl.o: /slave/users/parnanen/src/pf/state.h
switchtestimpl.o: /slave/users/parnanen/src/pf/protocol.h
switchtestimpl.o: /slave/users/parnanen/src/pf/types.h
switchtestimpl.o: /slave/users/parnanen/src/pf/transp.h
switchtestimpl.o: /slave/users/parnanen/src/pf/conduit.h
switchtestimpl.o: /slave/users/parnanen/src/pf/exception.h
switchtestimpl.o: /slave/users/parnanen/src/pf/messenge.h
switchtestimpl.o: /slave/users/parnanen/src/pf/storage.h
switchtestimpl.o: /slave/users/parnanen/src/pf/frame.h
switchtestimpl.o: /slave/users/parnanen/src/pf/bitstring.h
switchtestimpl.o: /slave/users/parnanen/src/sf/task.h
switchtestimpl.o: /slave/users/parnanen/src/pf/timers.h
switchtestimpl.o: /slave/users/parnanen/src/pf/timer.h
switchtestimpl.o: /slave/users/parnanen/src/sf/otime.h
switchtestmain.o: /slave/users/parnanen/src/sf/orbscheduler.h
switchtestmain.o: /slave/users/parnanen/src/sf/scheduler.h
switchtestmain.o: /slave/users/parnanen/src/pf/exception.h
switchtestmain.o: /slave/users/parnanen/src/pf/types.h
switchtestmain.o: /slave/users/parnanen/src/sf/schedulerhandle.h
switchtestmain.o: /slave/users/parnanen/src/sf/otime.h
switchtestmain.o: /slave/users/parnanen/src/pf/system.h
switchtestmain.o: /slave/users/parnanen/src/pf/debug.h
switchtestmain.o: /slave/users/parnanen/src/pf/system.h
switchtestmain.o: /slave/users/parnanen/src/pf/state.h
switchtestmain.o: /slave/users/parnanen/src/pf/protocol.h
switchtestmain.o: /slave/users/parnanen/src/pf/transp.h
switchtestmain.o: /slave/users/parnanen/src/pf/conduit.h
switchtestmain.o: /slave/users/parnanen/src/pf/messenge.h
switchtestmain.o: /slave/users/parnanen/src/pf/storage.h
switchtestmain.o: /slave/users/parnanen/src/pf/frame.h
switchtestmain.o: /slave/users/parnanen/src/pf/bitstring.h
switchtestmain.o: /slave/users/parnanen/src/pf/types.h
switchtestmain.o: /slave/users/parnanen/src/sf/task.h
switchtestmain.o: /slave/users/parnanen/src/pf/timers.h
switchtestmain.o: /slave/users/parnanen/src/pf/timer.h
switchtestmain.o: /slave/users/parnanen/src/sf/otime.h switchtestimpl.h
switchtestmain.o: /slave/users/parnanen/src/mgmt/mgmtdelegationbase.h
