#
# Copyright (C) 2004, SCONCE, UCI-ICS
#
#
# File Name:
#    $ libibg/Makefile $
#
#
# Description:
#    Make dependancy file.
#
#
# Revision History:
#     02/10/2004   JHYI   Initial revision.
#
#

INCDIR = ../include 

#DEFS	 = -DMEASURE
DEFS	 =
CC = gcc
CCC  = g++
OPTS	 = -g -Wall     	
CFLAGS = $(OPTS) $(DEFS)
CCFLAGS = $(OPTS) $(DEFS)

AR = ar
ARFLAGS = r

INCS = -I$(INCDIR) 

LIB     = ./libibg.a
CSRCS    = ibgEncode.c  ibgLib.c  ibgMemory.c \
					 ibgProto.c  ibgSocket.c  ibgUtil.c
#CPPSRCS = 
CPPSRCS = gateway.cpp

.c.o:
	$(CC) -c $(CFLAGS) $(INCS) $(CSRCS)

.cpp.o:
	$(CCC) -c $(CFLAGS) $(INCS) $(CPPSRCS)

OBJS    = $(CSRCS:.c=.o) $(CPPSRCS:.cpp=.o)

all:	$(LIB)

$(LIB):	$(OBJS)
	rm -f $(LIB)
	$(AR) $(ARFLAGS) $@ $(OBJS)

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

