#
# Matrixtunnel control scripts Makefile
#
# $Id: Makefile,v 1.1.1.1 2004/04/28 07:18:25 tom Exp $
#

CFLAGS	+= -s -O2 -Wall

CFLAGS	+= $(PATHNVRAM)
CFLAGS	+= $(PATHUSER)
CFLAGS  += $(PATHGEM)
CFLAGS  += $(PATHSHARED) -I ../httpd_LINKSYS_WRTR124GN/ -I ../httpd_LINKSYS_WRTR124GN/matrixssl/  -DLINUX
#LDFLAGS	+= $(LIBNVRAM) -L../httpd_LINKSYS_WRTR124GN/matrixssl/src -lmatrixsslstatic

LDFLAGS	+= $(LIBNVRAM) -L../httpd_LINKSYS_WRTR124GN/matrixssl/src -lmatrixssl

OBJS		+= matrixtunnel.c  sslSocket.c

all: matrixtunnel

clean:
	rm -f *.o *~ matrixtunnel

install: all
	install -d $(INSTALLDIR)/bin
	install matrixtunnel $(INSTALLDIR)/bin
	
matrixtunnel: $(OBJS) 
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) 
	$(STRIP) matrixtunnel

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

romfs:
	cp matrixtunnel $(ROMFSDIR)/bin
