# Internet Junkbuster makefile

# Changed by Kenta Cho for Galactica Proxy.
#  (for win32)

# 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   = gp
O      = o
RM     = rm -f
MORE_CFLAGS = -g

# 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      = gp         # uncomment if you don't use HPFS

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

# use these for mingw32
#PROG        = gp.exe
#MORE_CFLAGS = -DWin32_Winsock -O3 -mno-cygwin
#LDFLAGS     = -lwsock32

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

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


# Galactica Proxy for cygwin

SDL_HOME = E:/usr/SDL-1.2.2
FREETYPE_HOME = E:/usr/gp/freetype-2.0.4

PROG        = gp.exe
MORE_CFLAGS = -DWIN32 -I$(SDL_HOME)/i386-mingw32msvc/include/SDL -I$(FREETYPE_HOME)/include -DWin32_Winsock -O3 -s -static -fomit-frame-pointer -mpentium -march=pentium -malign-functions=4 -fexpensive-optimizations -malign-double -fschedule-insns2 -mwide-multiply -fstrict-aliasing -mno-cygwin
LDFLAGS     = -L$(SDL_HOME)/i386-mingw32msvc/lib -L. -lglu32 -lopengl32 -lmingw32 -lSDLmain -lSDL -lwsock32 -mwindows -lfreetype

CFLAGS  = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)

OBJS =	gp.$(O) SDL_ttf.$(O) sjis2uni.$(O) \
	api.$(O) conv.$(O) guess.$(O) \
	hashtable.$(O) screen.$(O) \
	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)

$(PROG): $(OBJS) gp_res.o
	$(CC) $(CFLAGS) -o $(PROG) $(OBJS) gp_res.o $(LDFLAGS)

gp_res.o: gp.rc
	windres -i gp.rc -o gp_res.o

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

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

# $Id: Makefile,v 1.3 2001/08/22 15:01:34 kenta Exp $
# Written and copyright 1997-8 Anonymous Coders and Gps Corporation.
# Distributed under the GNU General Public License; see the README file.
# This code comes with NO WARRANTY. http://www.junkbaster.com/ht/en/gpl.html
