# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
# 
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
# 
# The Original Code is Freedom code.
# 
# The Initial Developer of the Original Code is Zero-Knowledge Systems,
# Inc.  Portions created by Zero-Knowledge are Copyright (C) 2000
# Zero-Knowledge Systems, Inc.  All Rights Reserved.
# 
# Contributor(s):

# 
# Default target
#

default:: libs

# Get the variables definition
include $(ZK_ROOT)/freedom/client/makefiles/Makefile.vars

# Override and define new variables
# ZK_SUB_PROJECTS := linux/test
ZK_PUBLIBS := libfrctrafficfilter.a

ZK_LDFLAGS += $(ZK_GTKLDFLAGS)

ZK_INCS +=  \
	-idirafter $(ZK_FREEDOM_ROOT)/client/zkshim/trafficfilter/xp \
        -idirafter $(ZK_FREEDOM_ROOT)/client/zkshim/trafficfilter/linux \
	-idirafter $(ZK_FREEDOM_ROOT)/client/zkbase/errorhandling/xp \
        -idirafter $(ZK_FREEDOM_ROOT)/client/zkbase/errorhandling/linux \
	-idirafter $(ZK_FREEDOM_ROOT)/client/zkbase/inethelp/linux \
        -idirafter $(ZK_FREEDOM_ROOT)/client/zkbase/inethelp/xp \
        -idirafter $(ZK_FREEDOM_ROOT)/client/zkbase/clientbase/xp \
        -idirafter $(ZK_FREEDOM_ROOT)/client/zkcentral/zkservice/ \
	-idirafter $(ZK_FREEDOM_ROOT)/client/zkcentral/clienttypes/ \
	-idirafter $(ZK_ROOT)/lib3rd/openssl/include/ \
	-idirafter $(ZK_FREEDOM_ROOT)/ndb/include/ \
	-idirafter $(ZK_ROOT)/libzk/src/ \
	-idirafter /usr/local/include/g++-v3/ext/ \
	-idirafter $(ZK_FREEDOM_ROOT)/client/zkshim/linux/clientshim/include/ \
	$(END_OF_LIST)
# g++-3 above is a hack. the file normally resides in a system include dir,
# so I don't want to change the source.


ZK_CXXFLAGS := $(subst -Wshadow, ,$(ZK_CXXFLAGS)) 

ZK_DEFS += -DCLIENT_SHIM -DPOLL_SHUTDOWN
#-DGROK_INCOMING_DNS
#-DDUMP_INCOMING -DDUMP_OUTGOING 

ZK_ALL_SRCFILES := \
	xp/DPacket.cpp \
	xp/RCloudSocket.cpp \
	xp/TrafficFilter.cpp \
	xp/DnsFilter.cpp \
        linux/RShimInterface.cpp \
	linux/RLinuxPacketHandler.cpp \
	linux/LinuxDnsFilter.cpp \
	$(END_OF_LIST)


# Get the target rules
include $(ZK_ROOT)/freedom/client/makefiles/Makefile.targs

# Add new targets or complement default target using :: rules

# Specify dependencies
$(ZK_BUILDDIR_PUBLIB)/libfrctrafficfilter.a: $(ZK_FULLCXXOBJS) 

