# Internet Junkbuster makefile
#
# if your OS has the POSIX.2 regular expression matching functions and
# you wish to use regular expressions in your blockfile path patterns,
# then uncomment "REGEX ="
#
# Warning: Solaris 2.x claims to have them (it compiles) but doesn't work!
#
# if your OS doesn't have them, you can get them from
#
# 	ftp://prep.ai.mit.edu/pub/gnu/rx-1.5.tar.gz
#
# after you unpack and compile the library
#
#     copy  rx-1.5/rx/inst-rxposix.h to regex.h
#     copy  rx-1.5/rx/librx.a        to librx.a
#
# in this directory and uncomment the "LIBRX =" line below
#
# For OS/2 get the above library, compile it with EMX then
#   copy  librx.a   to  $LIBRARY_PATH/rx.a
# uncomment the REGEX definition but not the the LIBRX definition
# additional choose the appropriate linker options for OS/2
#

REGEX = -DREGEX	# uncomment if you are using any regular expressions
			# see Warning: above if using REGEX with Solaris 2.x

#LIBRX = librx.a	# uncomment if you are using librx
                        # don't uncomment for OS/2

DEFAULT_CFLAGS = -g -I. $(REGEX) # don't comment this one out

CFLAGS = $(DEFAULT_CFLAGS)

# Uncomment following for use with OS/2 EMX
# I used EMX 0.9c
CC = gcc
CFLAGS = $(DEFAULT_CFLAGS) -DOS2 # set Flag for OS/2
#LDFLAGS = -lsocket -Zexe -s	 # uncomment if you don't have the rx-library
LDFLAGS = -lsocket -lrx -Zexe -s # uncomment for Junkbuster with regular exp.
                                 # Additional uncomment definition of REGEX,
                                 # but not the definition of LIBRX

# use this for Solaris 2.x
# see Warning: above about REGEX with Solarix 2.x
#LDFLAGS = -lnsl -lsocket 

# use these for SunOS 4.x
#LDFLAGS = -nsl
#CFLAGS = $(DEFAULT_CFLAGS) -DNOSTRERROR

# use this for HPUX 10.01
# you may get pointer assignment warnings
#CFLAGS = -Ae $(DEFAULT_CFLAGS)

SRCS = jcc.c parsers.c loaders.c bind.c conn.c encode.c ssplit.c socks4.c jcc.h Makefile
OBJS = jcc.o parsers.o loaders.o bind.o conn.o encode.o ssplit.o socks4.o $(LIBRX)

junkbuster: $(OBJS)
	$(CC) $(CFLAGS) -o junkbuster $(OBJS) $(LDFLAGS)

dist:
	tar cvf junkbuster.tar $(SRCS)

clean:
	rm -f a.out core *.o

clobber: clean
	rm -f junkbuster *.pdb *.exe *.lib *.exp

# $Id: Makefile,v 3.3 1997/04/20 17:18:13 ACJC Exp $
# Written and copyright by the Anonymous Coders and Junkbusters Corporation.
# Will be made available under the GNU General Public License.
# This software comes with NO WARRANTY.
# 1997/08/20 Gerd Flender
# Changed the Makefile to use it with OS/2 EMX
