#	$Id: Makefile,v 1.1.1.1 2007/07/09 01:37:47 pengqinghua Exp $
include $(APPS_DIR)/apps.mk
CDEF1=	-DTERMIOS			# Use the termios structure
CDEF2=	-DSIGTYPE=void			# Standard definition
CDEF3=	-UNO_SLEEP			# Use the usleep function
CDEF4=	-DFNDELAY=O_NDELAY		# Old name value
CDEFS=	$(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
CFLAGS +=	-O2  -pipe $(CDEFS)
CFLAGS += -DTG2530 -DNB
CFLAGS += -I$(APPS_DIR)/include
CFLAGS += -I$(APPS_DIR)/server
CFLAGS += -I$(APPS_DIR)/extend_include

CFLAGS += -I$(APPS_DIR)/common

VPATH += $(APPS_DIR)/common

LDFLAGS += -L$(APPS_DIR)/lib -lwag302

INSTALL= install

all:	chat

chat:	chat.o
	$(CC) $(LDFLAGS) -o  chat chat.o

chat.o:	chat.c
	$(CC) -c $(CFLAGS) -o chat.o chat.c

dist: install

install: chat
	$(STRIP) chat
	cp chat	$(TARGET_ROOT_DIR)/usr/sbin/
	#$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8

clean:
	rm -f chat.o chat *~
