include ../../config.mak

VPATH=$(SRC_PATH)/M4Systems/IETF

# NOTE: -I.. is needed to include config.h
CFLAGS= $(OPTFLAGS) -Wall -I.. -I$(SRC_PATH)/include

ifeq ($(DEBUGBUILD), yes)
CFLAGS+=-g
LDFLAGS+=-g
endif


#common obj
OBJS= RTCP.o \
	RTP.o \
	RTPReorder.o \
	RTSP_command.o \
	RTSP_common.o \
	RTSP_http.o \
	RTSP_response.o \
	RTSP_server.o \
	RTSP_session.o \
	SDP.o


SRCS := $(OBJS:.o=.c) 

LIB=../../bin/gcc/temp/libm4systems_ietf.a

all: $(LIB)


$(LIB): $(OBJS)
	$(AR) rc $@ $(OBJS)
	$(RANLIB) $@


%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $< 



dep: depend

depend:
	rm -f .depend
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend


clean: 
	rm -f *.o $(LIB)



distclean: clean
	rm -f Makefile.bak .depend



# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif
