# Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
#  

NAME = StreamingLoadTool
C++ = $(CPLUS)
CC = $(CCOMP)
LINK = $(LINKER)
CCFLAGS += $(COMPILER_FLAGS) $(INCLUDE_FLAG) ../PlatformHeader.h -g -Wall
LIBS = $(CORE_LINK_LIBS) -lCommonUtilitiesLib ../CommonUtilitiesLib/libCommonUtilitiesLib.a

#OPTIMIZATION
CCFLAGS += -O3

# EACH DIRECTORY WITH HEADERS MUST BE APPENDED IN THIS MANNER TO THE CCFLAGS

CCFLAGS += -I.
CCFLAGS += -I..
CCFLAGS += -I../OSMemoryLib
CCFLAGS += -I../RTSPClientLib
CCFLAGS += -I../APICommonCode
CCFLAGS += -I../CommonUtilitiesLib
CCFLAGS += -I../PrefsSourceLib
CCFLAGS += -I../APIStubLib
CCFLAGS += -I../RTPMetaInfoLib

# EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS

LINKOPTS = -L../CommonUtilitiesLib

C++FLAGS = $(CCFLAGS)

CFILES = 

CPPFILES = 	StreamingLoadTool.cpp \
                        ../SafeStdLib/InternalStdLib.cpp \
			../RTSPClientLib/ClientSocket.cpp \
			../RTSPClientLib/RTSPClient.cpp \
			../RTSPClientLib/ClientSession.cpp \
			../PrefsSourceLib/FilePrefsSource.cpp \
			../APICommonCode/SDPSourceInfo.cpp \
			../APICommonCode/SourceInfo.cpp \
			../RTPMetaInfoLib/RTPMetaInfoPacket.cpp \
			../OSMemoryLib/OSMemory.cpp
	

# CCFLAGS += $(foreach dir,$(HDRS),-I$(dir))

all: StreamingLoadTool

StreamingLoadTool: $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
	$(LINK) -o $@ $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) $(COMPILER_FLAGS) $(LINKOPTS) $(LIBS) 

install: StreamingLoadTool

clean:
	rm -f $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)

.SUFFIXES: .cpp .c .o

.cpp.o:
	$(C++) -c -o $*.o $(DEFINES) $(C++FLAGS) $*.cpp

.c.o:
	$(CC) -c -o $*.o $(DEFINES) $(CCFLAGS) $*.c

