# Internet Junkbuster makefile

# comment out the next line if you do NOT want to use regular expressions
REGEX = -DREGEX

DEFAULT_CFLAGS = -I. $(REGEX) -DSTDC_HEADERS -DHAVE_STRING

#PROG   = junkbuster
#O      = o
#RM     = rm -f
#CC     = gcc
#MORE_CFLAGS = -O3 -D_DISTNAME="$(DISTNAME)" -D_DISTURL="$(DISTURL)"

PLATFORM_OBJS=
PLATFORM_FILES=

# use this for Solaris 2.x
#LDFLAGS = -lnsl -lsocket 

# use these for SunOS 4.x
#LDFLAGS = -nsl
#MORE_CFLAGS = -g -DNOSTRERROR

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

# use these with OS/2 EMX (tested with EMX 0.9c)
#CC        = gcc
#MOREFLAGS = -DOS2
#LDFLAGS   = -lsocket -Zexe -s
#RM        = del
#PROG      = junkbstr         # uncomment if you don't use HPFS

# use this for BSD/OS 3.0
#CC=shlicc2

# use these for mingw32
#PROG        = junkbstr.exe
#MORE_CFLAGS = -DWin32_Winsock -O3
#LDFLAGS     = -lwsock32

# use these for Win32
#PROG     = junkbstr.exe
#MORE_CFLAGS = /nologo -MT -Og
#LDFLAGS = wsock32.lib
O       = obj
RM      = del

# use these for MS VC++
CC     = cl
DISTNAME    = \"Windows-2.0.2-6\"
DISTURL     = \"http://www.waldherr.org/junkbuster/\"
PROG     = junkbstr.exe
MORE_CFLAGS = /nologo -MT -Og -D_WIN32 -DWin32_Winsock -D_DISTNAME="$(DISTNAME)" -D_DISTURL="$(DISTURL)"
LDFLAGS = /link /release /subsystem:windows  /machine:ix86 wsock32.lib  kernel32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib comctl32.lib w32.res
PLATFORM_OBJS =  w32taskbar.$(O) w32log.$(O)
PLATFORM_FILES = w32.res
# Use this for the old console mode
#LDFLAGS = wsock32.lib

#O       = obj
#RM      = del

# use these for Cygnus' Win32 environment
# works only single-threaded, ini file must turn on
# single_threaded
#DISTNAME    = \"Windoze-2.0.2-2\"
#DISTURL     = \"http://www.???.org/\"
#PROG        = junkbstr.exe
#MORE_CFLAGS = -D_DISTNAME="$(DISTNAME)" -D_DISTURL="$(DISTURL)" -D_WIN32 -D_CYGWIN -DWin32_Winsock -O3 -s
#LDFLAGS     = -lwsock32

# use these for BeOS
#MORE_CFLAGS = -relax_pointers
#LDFLAGS = -map junkbuster.xMAP

CFLAGS  = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)

OBJS =	jcc.$(O) parsers.$(O) filters.$(O) loaders.$(O) bind.$(O) conn.$(O) \
	encode.$(O) ssplit.$(O) socks4.$(O) acl.$(O) gnu_regex.$(O) win32.$(O) \
	$(PLATFORM_OBJS)

$(PROG): $(OBJS) $(PLATFORM_FILES)
	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)

clean:
	$(RM) a.out core *.o *.obj

clobber: clean
	$(RM) junkbuster junkbuster.xMAP junkbstr.exe *.pdb *.lib *.exp

# $Id: Makefile,v 1.1.1.1 1999/02/12 19:23:59 swa Exp $
# Written and copyright 1997 Anonymous Coders and Junkbusters Corporation.
# Distributed under the GNU General Public License; see the README file.
# This code comes with NO WARRANTY. http://www.junkbusters.com/ht/en/gpl.html
