#
# UnrealIRCd Makefile - codemastr
#
CC=cl
LINK=link
RC=rc
MT=mt

############################ USER CONFIGURATION ############################

# You are encouraged NOT to set these values here, but instead make a batch file
# which passes all these arguments to nmake, like:
# nmake -f makefile.win32 LIBRESSL_INC_DIR="c:\dev\libressl" etc etc...
# Both ways will work, but if you use a batch file it's easier with
# upgrading UnrealIRCd as you won't have to edit this makefile again.

### TRE ###
#TRE_LIB_DIR="C:\dev\tre\win32\release"
#TRE_INC_DIR="C:\dev\tre"
#TRELIB="tre.lib"

### PCRE2 ###
#PCRE2_LIB_DIR="C:\dev\pcre2\build\release"
#PCRE2_INC_DIR="C:\dev\pcre2"
#PCRE2LIB="pcre2-8.lib"

### C-ARES ####
#CARES_LIB_DIR="C:\dev\c-ares\vc\cares\dll-release"
#CARES_INC_DIR="C:\dev\c-ares"
#CARESLIB="cares.lib"

##### REMOTE INCLUDES ####
#To enable remote include support you must have libcurl installed on your
#system and it must have ares support enabled.
#
#
#To enable remote includes uncomment the next line:
#USE_REMOTEINC=1
#
#If your libcurl library and include files are not in your compiler's
#default locations, specify the locations here:
#LIBCURL_INC_DIR="c:\dev\curl\include"
#LIBCURL_LIB_DIR="c:\dev\curl\lib"
#
#
### END REMOTE INCLUDES ##

####### SSL SUPPORT ######
#Use LibreSSL or OpenSSL. Define paths and libraries:
#LIBRESSL_INC_DIR="c:\dev\libressl\include"
#LIBRESSL_LIB_DIR="c:\dev\libressl\lib"
#SSLLIB=libcrypto-38.lib libssl-39.lib libtls-11.lib
#The version numbers of the 3 libraries in the last line change
#every libressl release. So be sure to update after any libressl upgrade.
######### END SSL ########

###### _EXTRA_ DEBUGGING #####
# We always build releases with debugging information, since otherwise
# we cannot trace the source of a crash. Plus we do not mind the extra
# performance hit caused by not enabling super-optimization, tracing
# crashes properly is more important.
# You can choose (at your own risk) to enable EVEN MORE debugging,
# note that this causes /MDd to be used instead of /MD which can make
# libraries incompatible, plus all the other side-effects such as
# requiring a different dll we do not ship (and maybe you are not even
# allowed to ship due to license agreements), etc...
# In any case, this probably should not be used, unless debugging a
# problem locally, in which case it can be useful.
#DEBUGEXTRA=1
#
#
#### END RELEASE BUILD ###

############################# END CONFIGURATION ############################

!IFDEF CARES_INC_DIR
CARES_INC=/I "$(CARES_INC_DIR)"
!ENDIF
!IFDEF CARES_LIB_DIR
CARES_LIB=/LIBPATH:"$(CARES_LIB_DIR)"
!ENDIF

!IFDEF TRE_INC_DIR
TRE_INC=/I "$(TRE_INC_DIR)"
!ENDIF
!IFDEF TRE_LIB_DIR
TRE_LIB=/LIBPATH:"$(TRE_LIB_DIR)"
!ENDIF

!IFDEF PCRE2_INC_DIR
PCRE2_INC=/I "$(PCRE2_INC_DIR)"
!ENDIF
!IFDEF PCRE2_LIB_DIR
PCRE2_LIB=/LIBPATH:"$(PCRE2_LIB_DIR)"
!ENDIF

!IFDEF USE_REMOTEINC
CURLCFLAGS=/D USE_LIBCURL
CURLOBJ=SRC/URL.OBJ
CURLLIB=libcurl.lib
!IFDEF LIBCURL_INC_DIR
LIBCURL_INC=/I "$(LIBCURL_INC_DIR)"
!ENDIF
!IFDEF LIBCURL_LIB_DIR
LIBCURL_LIB=/LIBPATH:"$(LIBCURL_LIB_DIR)"
!ENDIF
!ENDIF

!IFDEF LIBRESSL_INC_DIR
LIBRESSL_INC=/I "$(LIBRESSL_INC_DIR)"
!ENDIF
!IFDEF LIBRESSL_LIB_DIR
LIBRESSL_LIB=/LIBPATH:"$(LIBRESSL_LIB_DIR)"
!ENDIF

!IFDEF DEBUGEXTRA
DBGCFLAG=/MDd /Zi /Od
DBGCFLAGST=/MTd /Zi /Od
DBGLFLAG=/debug
MODDBGCFLAG=/LDd /MDd /Zi
!ELSE
DBGCFLAG=/MD /Zi
DBGCFLAGST=/MT /Zi
DBGLFLAG=/debug
MODDBGCFLAG=/LDd /MD /Zi
!ENDIF 

FD_SETSIZE=/D FD_SETSIZE=16384
CFLAGS=$(DBGCFLAG) $(TRE_INC) $(PCRE2_INC) $(CARES_INC) $(LIBCURL_INC) $(LIBRESSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
 $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
CFLAGSST=$(DBGCFLAGST) $(TRE_INC) $(PCRE2_INC) $(CARES_INC) $(LIBCURL_INC) $(LIBRESSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
 $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) /D NOSPOOF=1 /c /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \
 dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(CARES_LIB) $(CARESLIB) $(TRE_LIB) $(TRELIB) \
  $(PCRE2_LIB) $(PCRE2LIB) $(LIBRESSL_LIB) $(SSLLIB) $(LIBCURL_LIB) $(CURLLIB) /def:UnrealIRCd.def /implib:UnrealIRCd.lib \
 /nologo $(DBGLFLAG) /out:UnrealIRCd.exe
MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(CURLCFLAGS) /J /Fesrc/modules/ \
 /Fosrc/modules/ /nologo $(TRE_INC) $(PCRE2_INC) $(CARES_INC) $(LIBCURL_INC) $(LIBRESSL_INC) /I ./INCLUDE /D \
 DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _USE_32BIT_TIME_T
MODLFLAGS=/link /def:src/modules/module.def UnrealIRCd.lib ws2_32.lib $(TRE_LIB) $(TRELIB) \
 $(PCRE2_LIB) $(PCRE2LIB) $(CARES_LIB) $(LIBRESSL_LIB) $(SSLLIB) \
 $(LIBCURL_LIB) $(CURLLIB)

INCLUDES=./include/struct.h ./include/config.h ./include/sys.h \
 ./include/common.h ./include/version.h ./include/h.h ./include/numeric.h \
 ./include/msg.h ./include/setup.h ./include/dynconf.h

EXP_OBJ_FILES=SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.OBJ \
 SRC/S_CONF.OBJ SRC/FDLIST.OBJ SRC/DBUF.OBJ  \
 SRC/CLOAK.OBJ SRC/HASH.OBJ SRC/PARSE.OBJ SRC/IRCD.OBJ \
 SRC/S_NUMERIC.OBJ SRC/WHOWAS.OBJ  SRC/S_AUTH.OBJ \
 SRC/S_MISC.OBJ SRC/MATCH.OBJ SRC/CRULE.OBJ \
 SRC/S_DEBUG.OBJ  SRC/SUPPORT.OBJ SRC/LIST.OBJ \
 SRC/S_ERR.OBJ SRC/PACKET.OBJ SRC/S_BSD.OBJ \
 SRC/S_SERV.OBJ SRC/S_USER.OBJ \
 SRC/VERSION.OBJ SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ \
 SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/RES.OBJ SRC/MODULES.OBJ \
 SRC/S_SVS.OBJ SRC/EVENTS.OBJ SRC/UMODES.OBJ SRC/AUTH.OBJ SRC/SSL.OBJ \
 SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ SRC/MODDATA.OBJ SRC/UID.OBJ SRC/MEMPOOL.OBJ \
 SRC/S_DISPATCH.OBJ SRC/MD5.OBJ SRC/API-ISUPPORT.OBJ SRC/API-COMMAND.OBJ \
 SRC/API-CLICAP.OBJ SRC/EXTBANS.OBJ SRC/TIMESYNCH.OBJ SRC/CRYPT_BLOWFISH.OBJ \
 SRC/OPERCLASS.OBJ SRC/UPDCONF.OBJ SRC/CRASHREPORT.OBJ \
 SRC/OPENSSL_HOSTNAME_VALIDATION.OBJ $(CURLOBJ)

OBJ_FILES=$(EXP_OBJ_FILES) SRC/GUI.OBJ SRC/SERVICE.OBJ SRC/DEBUG.OBJ SRC/RTF.OBJ \
 SRC/EDITOR.OBJ SRC/WIN32.OBJ 

DLL_FILES=SRC/MODULES/M_CHGHOST.DLL SRC/MODULES/M_SDESC.DLL SRC/MODULES/M_SETIDENT.DLL \
 SRC/MODULES/M_SETNAME.DLL SRC/MODULES/M_SETHOST.DLL SRC/MODULES/M_CHGIDENT.DLL \
 SRC/MODULES/M_SVSMOTD.DLL SRC/MODULES/M_SVSNLINE.DLL SRC/MODULES/M_WHO.DLL \
 SRC/MODULES/M_SWHOIS.DLL SRC/MODULES/M_SVSMODE.DLL SRC/MODULES/M_AWAY.DLL \
 SRC/MODULES/M_SVSNOOP.DLL SRC/MODULES/M_MKPASSWD.DLL \
 SRC/MODULES/M_SVSNICK.DLL \
 SRC/MODULES/M_CHGNAME.DLL \
 SRC/MODULES/M_LAG.DLL SRC/MODULES/M_MESSAGE.DLL \
 SRC/MODULES/M_OPER.DLL SRC/MODULES/M_PINGPONG.DLL SRC/MODULES/M_QUIT.DLL \
 SRC/MODULES/M_SENDUMODE.DLL \
 SRC/MODULES/M_SQLINE.DLL SRC/MODULES/M_KILL.DLL SRC/MODULES/M_TSCTL.DLL \
 SRC/MODULES/M_UNSQLINE.DLL \
 SRC/MODULES/M_WHOIS.DLL SRC/MODULES/M_TKL.DLL SRC/MODULES/M_VHOST.DLL \
 SRC/MODULES/M_CYCLE.DLL SRC/MODULES/M_SVSJOIN.DLL SRC/MODULES/M_SVSPART.DLL \
 SRC/MODULES/M_SVSLUSERS.DLL SRC/MODULES/M_SVSWATCH.DLL SRC/MODULES/M_SVSSILENCE.DLL \
 SRC/MODULES/M_SENDSNO.DLL SRC/MODULES/M_SVSSNO.DLL SRC/MODULES/M_SAJOIN.DLL \
 SRC/MODULES/M_SAPART.DLL SRC/MODULES/M_SAMODE.DLL SRC/MODULES/M_KICK.DLL \
 SRC/MODULES/M_TOPIC.DLL SRC/MODULES/M_INVITE.DLL SRC/MODULES/M_LIST.DLL \
 SRC/MODULES/M_TIME.DLL SRC/MODULES/M_SVSKILL.DLL SRC/MODULES/M_KNOCK.DLL \
 SRC/MODULES/M_UMODE2.DLL SRC/MODULES/M_SQUIT.DLL SRC/MODULES/M_PROTOCTL.DLL \
 SRC/MODULES/M_SJOIN.DLL SRC/MODULES/M_PASS.DLL SRC/MODULES/M_USERHOST.DLL \
 SRC/MODULES/M_ISON.DLL SRC/MODULES/M_SILENCE.DLL \
 SRC/MODULES/M_ADDMOTD.DLL SRC/MODULES/M_ADDOMOTD.DLL SRC/MODULES/M_WALLOPS.DLL \
 SRC/MODULES/M_GLOBOPS.DLL SRC/MODULES/M_LOCOPS.DLL \
 SRC/MODULES/M_ADMIN.DLL SRC/MODULES/M_TRACE.DLL SRC/MODULES/M_NETINFO.DLL \
 SRC/MODULES/M_LINKS.DLL SRC/MODULES/M_HELP.DLL SRC/MODULES/M_RULES.DLL \
 SRC/MODULES/M_CLOSE.DLL SRC/MODULES/M_MAP.DLL SRC/MODULES/M_EOS.DLL \
 SRC/MODULES/M_SERVER.DLL SRC/MODULES/M_STATS.DLL SRC/MODULES/M_SVSFLINE.DLL \
 SRC/MODULES/M_DCCDENY.DLL SRC/MODULES/M_UNDCCDENY.DLL SRC/MODULES/M_WHOWAS.DLL \
 SRC/MODULES/M_CONNECT.DLL SRC/MODULES/M_DCCALLOW.DLL SRC/MODULES/M_USERIP.DLL \
 SRC/MODULES/M_NICK.DLL SRC/MODULES/M_USER.DLL SRC/MODULES/M_MODE.DLL \
 SRC/MODULES/M_WATCH.DLL SRC/MODULES/M_PART.DLL SRC/MODULES/M_JOIN.DLL \
 SRC/MODULES/M_MOTD.DLL SRC/MODULES/M_OPERMOTD.DLL SRC/MODULES/M_BOTMOTD.DLL \
 SRC/MODULES/M_LUSERS.DLL SRC/MODULES/M_NAMES.DLL SRC/MODULES/M_SVSNOLAG.DLL \
 SRC/MODULES/M_STARTTLS.DLL \
 SRC/MODULES/M_NOPOST.DLL SRC/MODULES/M_CAP.DLL \
 SRC/MODULES/M_SASL.DLL \
 SRC/MODULES/SSL_ANTIDOS.DLL \
 SRC/MODULES/M_MD.DLL \
 SRC/MODULES/CERTFP.DLL \
 SRC/MODULES/CLOAK.DLL \
 SRC/MODULES/WEBIRC.DLL \
 SRC/MODULES/WEBSOCKET.DLL \
 SRC/MODULES/BLACKLIST.DLL \
 SRC/MODULES/JOINTHROTTLE.DLL \
 SRC/MODULES/ANTIRANDOM.DLL \
 SRC/MODULES/HIDESERVER.DLL \
 SRC/MODULES/JUMPSERVER.DLL \
 SRC/MODULES/M_IRCOPS.DLL \
 SRC/MODULES/M_STAFF.DLL \
 SRC/MODULES/NOCODES.DLL \
 SRC/MODULES/CHARSYS.DLL \
 SRC/MODULES/CHANMODES/CENSOR.DLL \
 SRC/MODULES/CHANMODES/DELAYJOIN.DLL \
 SRC/MODULES/CHANMODES/FLOODPROT.DLL \
 SRC/MODULES/CHANMODES/ISSECURE.DLL \
 SRC/MODULES/CHANMODES/LINK.DLL \
 SRC/MODULES/CHANMODES/NOCOLOR.DLL \
 SRC/MODULES/CHANMODES/NOCTCP.DLL \
 SRC/MODULES/CHANMODES/NOINVITE.DLL \
 SRC/MODULES/CHANMODES/NOKICK.DLL \
 SRC/MODULES/CHANMODES/NOKNOCK.DLL \
 SRC/MODULES/CHANMODES/NONICKCHANGE.DLL \
 SRC/MODULES/CHANMODES/NONOTICE.DLL \
 SRC/MODULES/CHANMODES/OPERONLY.DLL \
 SRC/MODULES/CHANMODES/PERMANENT.DLL \
 SRC/MODULES/CHANMODES/REGONLY.DLL \
 SRC/MODULES/CHANMODES/REGONLYSPEAK.DLL \
 SRC/MODULES/CHANMODES/SECUREONLY.DLL \
 SRC/MODULES/CHANMODES/STRIPCOLOR.DLL \
 SRC/MODULES/USERMODES/CENSOR.DLL \
 SRC/MODULES/USERMODES/NOCTCP.DLL \
 SRC/MODULES/USERMODES/BOT.DLL \
 SRC/MODULES/USERMODES/SERVICEBOT.DLL \
 SRC/MODULES/USERMODES/SHOWWHOIS.DLL \
 SRC/MODULES/USERMODES/PRIVACY.DLL \
 SRC/MODULES/USERMODES/NOKICK.DLL \
 SRC/MODULES/USERMODES/REGONLYMSG.DLL \
 SRC/MODULES/USERMODES/PRIVDEAF.DLL \
 SRC/MODULES/USERMODES/SECUREONLYMSG.DLL \
 SRC/MODULES/SNOMASKS/DCCREJECT.DLL \
 SRC/MODULES/EXTBANS/ACCOUNT.DLL \
 SRC/MODULES/EXTBANS/INCHANNEL.DLL \
 SRC/MODULES/EXTBANS/JOIN.DLL \
 SRC/MODULES/EXTBANS/NICKCHANGE.DLL \
 SRC/MODULES/EXTBANS/QUIET.DLL \
 SRC/MODULES/EXTBANS/REALNAME.DLL \
 SRC/MODULES/EXTBANS/REGNICK.DLL \
 SRC/MODULES/EXTBANS/OPERCLASS.DLL \
 SRC/MODULES/EXTBANS/CERTFP.DLL \
 SRC/MODULES/EXTBANS/TEXTBAN.DLL \
 SRC/MODULES/EXTBANS/MSGBYPASS.DLL \
 SRC/MODULES/EXTBANS/TIMEDBAN.DLL \
 SRC/MODULES/CAP/STS.DLL \
 SRC/MODULES/CAP/PLAINTEXT-POLICY.DLL \
 SRC/MODULES/CAP/LINK-SECURITY.DLL


ALL: CONF UNREALSVC.EXE UnrealIRCd.exe MODULES 

CLEAN:
        -@erase src\*.obj >NUL
        -@erase src\win32.res >NUL
        -@erase src\version.c >NUL
        -@erase src\win32\*.obj >NUL
	-@erase src\modules\*.obj >NUL
	-@erase src\modules\*.dll >NUL
	-@erase src\modules\chanmodes\*.dll >NUL
	-@erase src\modules\usermodes\*.dll >NUL
	-@erase src\modules\snomasks\*.dll >NUL
	-@erase src\modules\extbans\*.dll >NUL
	-@erase src\modules\cap\*.dll >NUL
        -@erase .\*.exe >NUL
	-@erase UnrealIRCd.lib >NUL
	-@erase src\modules\*.exp >NUL
	-@erase src\modules\*.lib >NUL
	-@erase src\modules\*.pdb >NUL
	-@erase src\modules\*.ilk >NUL

./UNREALSVC.EXE: SRC/UNREALSVC.OBJ SRC/WIN32/UNREALSVC.RES
	$(LINK) $(DBGLFLAGST) advapi32.lib src/unrealsvc.obj src/win32/unrealsvc.res

CONF:
	-@copy include\win32\setup.h include\setup.h >NUL
	$(CC) src/win32/config.c
	-@config.exe



./UnrealIRCd.exe: $(OBJ_FILES) SRC/win32/WIN32.RES
        $(LINK) $(LFLAGS) $(OBJ_FILES) SRC/win32/WIN32.RES /MAP
	-@erase src\win32\win32.res
	$(MT) -manifest src\win32\UnrealIRCd.exe.manifest -outputresource:UnrealIRCd.exe;1
!IFNDEF DEBUGEXTRA
 @echo Standard version built 
!ELSE
 @echo Extra-Debug version built ... 
!ENDIF

#Source files

src/version.obj: src/version.c
        $(CC) $(CFLAGS) src/version.c

src/parse.obj: src/parse.c $(INCLUDES)
        $(CC) $(CFLAGS) src/parse.c

src/socket.obj: src/socket.c $(INCLUDES)
        $(CC) $(CFLAGS) src/socket.c

src/dbuf.obj: src/dbuf.c $(INCLUDES) ./include/dbuf.h
        $(CC) $(CFLAGS) src/dbuf.c

src/ircsprintf.obj: src/ircsprintf.c $(INCLUDES)
	$(CC) $(CFLAGS) src/ircsprintf.c

src/packet.obj: src/packet.c $(INCLUDES)
        $(CC) $(CFLAGS) src/packet.c

src/fdlist.obj: src/fdlist.c $(INCLUDES)
        $(CC) $(CFLAGS) src/fdlist.c

src/dynconf.obj: src/dynconf.c $(INCLUDES) ./include/dbuf.h \
                ./include/channel.h ./include/whowas.h
        $(CC) $(CFLAGS) src/dynconf.c

src/send.obj: src/send.c $(INCLUDES)
        $(CC) $(CFLAGS) src/send.c

src/match.obj: src/match.c $(INCLUDES)
        $(CC) $(CFLAGS) src/match.c

src/support.obj: src/support.c $(INCLUDES)
        $(CC) $(CFLAGS) src/support.c

src/channel.obj: src/channel.c $(INCLUDES) ./include/channel.h
        $(CC) $(CFLAGS) src/channel.c

src/class.obj: src/class.c $(INCLUDES) ./include/class.h
        $(CC) $(CFLAGS) src/class.c

src/aln.obj: src/aln.c $(INCLUDES)
	$(CC) $(CFLAGS) src/aln.c

src/ircd.obj: src/ircd.c $(INCLUDES)
        $(CC) $(CFLAGS) src/ircd.c

src/list.obj: src/list.c $(INCLUDES)
        $(CC) $(CFLAGS) src/list.c

src/res.obj: src/res.c $(INCLUDES)
        $(CC) $(CFLAGS) src/res.c

src/timesynch.obj: src/timesynch.c $(INCLUDES)
        $(CC) $(CFLAGS) src/timesynch.c

src/s_bsd.obj: src/s_bsd.c $(INCLUDES)
        $(CC) $(CFLAGS) src/s_bsd.c

src/s_auth.obj: src/s_auth.c $(INCLUDES)
        $(CC) $(CFLAGS) src/s_auth.c

src/s_conf.obj: src/s_conf.c $(INCLUDES)
        $(CC) $(CFLAGS) src/s_conf.c

src/s_debug.obj: src/s_debug.c $(INCLUDES)
        $(CC) $(CFLAGS) src/s_debug.c

src/s_err.obj: src/s_err.c $(INCLUDES)
        $(CC) $(CFLAGS) src/s_err.c

src/s_kline.obj: src/s_kline.c $(INCLUDES)
        $(CC) $(CFLAGS) src/s_kline.c

src/s_misc.obj: src/s_misc.c $(INCLUDES) ./include/dbuf.h
        $(CC) $(CFLAGS) src/s_misc.c

src/scache.obj: src/scache.c $(INCLUDES) ./include/dbuf.h
        $(CC) $(CFLAGS) src/scache.c

src/s_socks.obj: src/s_socks.c $(INCLUDES)
        $(CC) $(CFLAGS) src/s_socks.c

src/s_svs.obj: src/s_svs.c $(INCLUDES)
	  $(CC) $(CFLAGS) src/s_svs.c

src/s_user.obj: src/s_user.c $(INCLUDES) ./include/dbuf.h \
                ./include/channel.h ./include/whowas.h
        $(CC) $(CFLAGS) src/s_user.c

src/s_extra.obj: src/s_extra.c $(INCLUDES) ./include/dbuf.h \
                ./include/channel.h ./include/whowas.h
        $(CC) $(CFLAGS) src/s_extra.c

src/s_serv.obj: src/s_serv.c $(INCLUDES) ./include/dbuf.h ./include/whowas.h
        $(CC) $(CFLAGS) src/s_serv.c

src/s_numeric.obj: src/s_numeric.c $(INCLUDES) ./include/dbuf.h
        $(CC) $(CFLAGS) src/s_numeric.c

src/whowas.obj: src/whowas.c $(INCLUDES) ./include/dbuf.h ./include/whowas.h
        $(CC) $(CFLAGS) src/whowas.c

src/hash.obj: src/hash.c $(INCLUDES) ./include/hash.h
        $(CC) $(CFLAGS) src/hash.c

src/crule.obj: src/crule.c $(INCLUDES)
        $(CC) $(CFLAGS) src/crule.c

src/gui.obj: src/win32/gui.c $(INCLUDES) ./include/resource.h
        $(CC) $(CFLAGS) src/win32/gui.c

src/rtf.obj: src/win32/rtf.c $(INCLUDES) ./src/win32/win32.h
	$(CC) $(CFLAGS) src/win32/rtf.c

src/editor.obj: src/win32/editor.c $(INCLUDES) ./include/resource.h ./src/win32/win32.h
        $(CC) $(CFLAGS) src/win32/editor.c

src/service.obj: src/win32/service.c $(INCLUDES)
	$(CC) $(CFLAGS) src/win32/service.c

src/debug.obj: src/win32/debug.c $(INCLUDES)
	$(CC) $(CFLAGS) src/win32/debug.c

src/win32.obj: src/win32/win32.c $(INCLUDES)
	$(CC) $(CFLAGS) src/win32/win32.c

src/unrealsvc.obj: src/win32/unrealsvc.c $(INCLUDES)
	$(CC) $(CFLAGSST) src/win32/unrealsvc.c

src/modules.obj: src/modules.c $(INCLUDES)
	$(CC) $(CFLAGS) src/modules.c

src/events.obj: src/events.c $(INCLUDES)
	$(CC) $(CFLAGS) src/events.c

src/umodes.obj: src/umodes.c $(INCLUDES)
	$(CC) $(CFLAGS) src/umodes.c

src/auth.obj: src/auth.c $(INCLUDES)
	$(CC) $(CFLAGS) src/auth.c

src/random.obj: src/random.c $(INCLUDES)
	$(CC) $(CFLAGS) src/random.c

src/extcmodes.obj: src/extcmodes.c $(INCLUDES)
	$(CC) $(CFLAGS) src/extcmodes.c

src/moddata.obj: src/moddata.c $(INCLUDES)
	$(CC) $(CFLAGS) src/moddata.c

src/uid.obj: src/uid.c $(INCLUDES)
	$(CC) $(CFLAGS) src/uid.c

src/mempool.obj: src/mempool.c $(INCLUDES)
	$(CC) $(CFLAGS) src/mempool.c

src/s_dispatch.obj: src/s_dispatch.c $(INCLUDES)
	$(CC) $(CFLAGS) src/s_dispatch.c

src/md5.obj: src/md5.c $(INCLUDES)
	$(CC) $(CFLAGS) src/md5.c

src/url.obj: src/url.c $(INCLUDES) ./include/url.h
	$(CC) $(CFLAGS) src/url.c

src/extbans.obj: src/extbans.c $(INCLUDES)
	$(CC) $(CFLAGS) src/extbans.c

src/api-isupport.obj: src/api-isupport.c $(INCLUDES)
	$(CC) $(CFLAGS) src/api-isupport.c

src/api-command.obj: src/api-command.c $(INCLUDES)
	$(CC) $(CFLAGS) src/api-command.c

src/api-clicap.obj: src/api-clicap.c $(INCLUDES)
	$(CC) $(CFLAGS) src/api-clicap.c

src/ssl.obj: src/ssl.c $(INCLUDES)
	$(CC) $(CFLAGS) src/ssl.c

src/crypt_blowfish.obj: src/crypt_blowfish.c $(INCLUDES)
	$(CC) $(CFLAGS) src/crypt_blowfish.c

src/operclass.obj: src/operclass.c $(INCLUDES) ./include/dbuf.h
        $(CC) $(CFLAGS) src/operclass.c

src/s_updconf.obj: src/s_updconf.c $(INCLUDES) ./include/dbuf.h
        $(CC) $(CFLAGS) src/s_updconf.c

src/win32/win32.res: src/win32/win32gui.rc
        $(RC) /l 0x409 /fosrc/win32/win32.res /i ./include /i ./src \
              /d NDEBUG src/win32/win32gui.rc

src/win32/unrealsvc.res: src/win32/unrealsvc.rc
        $(RC) /l 0x409 /fosrc/win32/unrealsvc.res /i ./include /i ./src \
              /d NDEBUG src/win32/unrealsvc.rc

################# Modules #################

CUSTOMMODULE: src/modules/third/$(MODULEFILE).c
	$(CC) $(MODCFLAGS) src/modules/third/$(MODULEFILE).c $(MODLFLAGS) \
	      /OUT:src/modules/third/$(MODULEFILE).dll $(EXLIBS)

SYMBOLFILE: 
	$(CC) src/win32/def-clean.c
	dlltool --output-def UnrealIRCd.def.in --export-all-symbols $(EXP_OBJ_FILES)
	def-clean UnrealIRCd.def.in UnrealIRCd.def

MODULES: $(DLL_FILES)

src/modules/m_chghost.dll: src/modules/m_chghost.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_chghost.c $(MODLFLAGS)

src/modules/m_chgident.dll: src/modules/m_chgident.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_chgident.c $(MODLFLAGS)

src/modules/m_sdesc.dll: src/modules/m_sdesc.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_sdesc.c $(MODLFLAGS)

src/modules/m_sethost.dll: src/modules/m_sethost.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_sethost.c $(MODLFLAGS)

src/modules/m_setident.dll: src/modules/m_setident.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_setident.c $(MODLFLAGS)

src/modules/m_setname.dll: src/modules/m_setname.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_setname.c $(MODLFLAGS)

src/modules/m_svsmotd.dll: src/modules/m_svsmotd.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsmotd.c $(MODLFLAGS)

src/modules/m_svsmode.dll: src/modules/m_svsmode.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsmode.c $(MODLFLAGS)

src/modules/m_tkl.dll: src/modules/m_tkl.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_tkl.c $(MODLFLAGS)

src/modules/m_swhois.dll: src/modules/m_swhois.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_swhois.c $(MODLFLAGS)

src/modules/m_svsnline.dll: src/modules/m_svsnline.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsnline.c $(MODLFLAGS)

src/modules/m_who.dll: src/modules/m_who.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_who.c $(MODLFLAGS)

src/modules/m_away.dll: src/modules/m_away.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_away.c $(MODLFLAGS)

src/modules/m_mkpasswd.dll: src/modules/m_mkpasswd.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_mkpasswd.c $(MODLFLAGS)

src/modules/m_svsnoop.dll: src/modules/m_svsnoop.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsnoop.c $(MODLFLAGS)

src/modules/m_svsnick.dll: src/modules/m_svsnick.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsnick.c $(MODLFLAGS)

src/modules/m_chgname.dll: src/modules/m_chgname.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_chgname.c $(MODLFLAGS)

src/modules/m_kill.dll: src/modules/m_kill.c $(INCLUDES) 
	$(CC) $(MODCFLAGS) src/modules/m_kill.c $(MODLFLAGS)

src/modules/m_lag.dll: src/modules/m_lag.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_lag.c $(MODLFLAGS)

src/modules/m_message.dll: src/modules/m_message.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_message.c $(MODLFLAGS)

src/modules/m_oper.dll: src/modules/m_oper.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_oper.c $(MODLFLAGS)

src/modules/m_pingpong.dll: src/modules/m_pingpong.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_pingpong.c $(MODLFLAGS)

src/modules/m_quit.dll: src/modules/m_quit.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_quit.c $(MODLFLAGS)

src/modules/m_sendumode.dll: src/modules/m_sendumode.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_sendumode.c $(MODLFLAGS)

src/modules/m_sqline.dll: src/modules/m_sqline.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_sqline.c $(MODLFLAGS)

src/modules/m_tsctl.dll: src/modules/m_tsctl.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_tsctl.c $(MODLFLAGS)

src/modules/m_unsqline.dll: src/modules/m_unsqline.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_unsqline.c $(MODLFLAGS)

src/modules/m_whois.dll: src/modules/m_whois.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_whois.c $(MODLFLAGS)

src/modules/m_vhost.dll: src/modules/m_vhost.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_vhost.c $(MODLFLAGS)

src/modules/m_cycle.dll: src/modules/m_cycle.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_cycle.c $(MODLFLAGS)

src/modules/m_svsjoin.dll: src/modules/m_svsjoin.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsjoin.c $(MODLFLAGS)

src/modules/m_svspart.dll: src/modules/m_svspart.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svspart.c $(MODLFLAGS)

src/modules/m_svslusers.dll: src/modules/m_svslusers.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_svslusers.c $(MODLFLAGS)

src/modules/m_svswatch.dll: src/modules/m_svswatch.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_svswatch.c $(MODLFLAGS)

src/modules/m_svssilence.dll: src/modules/m_svssilence.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_svssilence.c $(MODLFLAGS)

src/modules/m_sendsno.dll: src/modules/m_sendsno.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_sendsno.c $(MODLFLAGS)

src/modules/m_svssno.dll: src/modules/m_svssno.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_svssno.c $(MODLFLAGS)

src/modules/m_sajoin.dll: src/modules/m_sajoin.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_sajoin.c $(MODLFLAGS)

src/modules/m_sapart.dll: src/modules/m_sapart.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_sapart.c $(MODLFLAGS)

src/modules/m_samode.dll: src/modules/m_samode.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_samode.c $(MODLFLAGS)

src/modules/m_kick.dll: src/modules/m_kick.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_kick.c $(MODLFLAGS)

src/modules/m_topic.dll: src/modules/m_topic.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_topic.c $(MODLFLAGS)

src/modules/m_invite.dll: src/modules/m_invite.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_invite.c $(MODLFLAGS)

src/modules/m_list.dll: src/modules/m_list.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_list.c $(MODLFLAGS)

src/modules/m_time.dll: src/modules/m_time.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_time.c $(MODLFLAGS)

src/modules/m_svskill.dll: src/modules/m_svskill.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_svskill.c $(MODLFLAGS)

src/modules/m_sjoin.dll: src/modules/m_sjoin.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_sjoin.c $(MODLFLAGS)

src/modules/m_pass.dll: src/modules/m_pass.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_pass.c $(MODLFLAGS)

src/modules/m_userhost.dll: src/modules/m_userhost.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_userhost.c $(MODLFLAGS)

src/modules/m_ison.dll: src/modules/m_ison.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_ison.c $(MODLFLAGS)

src/modules/m_silence.dll: src/modules/m_silence.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_silence.c $(MODLFLAGS)

src/modules/m_knock.dll: src/modules/m_knock.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_knock.c $(MODLFLAGS)

src/modules/m_umode2.dll: src/modules/m_umode2.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_umode2.c $(MODLFLAGS)

src/modules/m_squit.dll: src/modules/m_squit.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_squit.c $(MODLFLAGS)

src/modules/m_protoctl.dll: src/modules/m_protoctl.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_protoctl.c $(MODLFLAGS)

src/modules/m_addmotd.dll: src/modules/m_addmotd.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_addmotd.c $(MODLFLAGS)

src/modules/m_addomotd.dll: src/modules/m_addomotd.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_addomotd.c $(MODLFLAGS)

src/modules/m_wallops.dll: src/modules/m_wallops.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_wallops.c $(MODLFLAGS)

src/modules/m_admin.dll: src/modules/m_admin.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_admin.c $(MODLFLAGS)

src/modules/m_globops.dll: src/modules/m_globops.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_globops.c $(MODLFLAGS)

src/modules/m_locops.dll: src/modules/m_locops.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_locops.c $(MODLFLAGS)

src/modules/m_trace.dll: src/modules/m_trace.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_trace.c $(MODLFLAGS)

src/modules/m_netinfo.dll: src/modules/m_netinfo.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_netinfo.c $(MODLFLAGS)

src/modules/m_links.dll: src/modules/m_links.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_links.c $(MODLFLAGS)

src/modules/m_help.dll: src/modules/m_help.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_help.c $(MODLFLAGS)

src/modules/m_rules.dll: src/modules/m_rules.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_rules.c $(MODLFLAGS)
 
src/modules/m_close.dll: src/modules/m_close.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_close.c $(MODLFLAGS)

src/modules/m_map.dll: src/modules/m_map.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_map.c $(MODLFLAGS)

src/modules/m_eos.dll: src/modules/m_eos.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_eos.c $(MODLFLAGS)

src/modules/m_server.dll: src/modules/m_server.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_server.c $(MODLFLAGS)

src/modules/m_stats.dll: src/modules/m_stats.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_stats.c $(MODLFLAGS)

src/modules/m_svsfline.dll: src/modules/m_svsfline.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsfline.c $(MODLFLAGS)

src/modules/m_dccdeny.dll: src/modules/m_dccdeny.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_dccdeny.c $(MODLFLAGS)

src/modules/m_undccdeny.dll: src/modules/m_undccdeny.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_undccdeny.c $(MODLFLAGS)

src/modules/m_whowas.dll: src/modules/m_whowas.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_whowas.c $(MODLFLAGS)

src/modules/m_connect.dll: src/modules/m_connect.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_connect.c $(MODLFLAGS)

src/modules/m_dccallow.dll: src/modules/m_dccallow.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_dccallow.c $(MODLFLAGS)

src/modules/m_userip.dll: src/modules/m_userip.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_userip.c $(MODLFLAGS)

src/modules/m_nick.dll: src/modules/m_nick.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_nick.c $(MODLFLAGS)

src/modules/m_user.dll: src/modules/m_user.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_user.c $(MODLFLAGS)

src/modules/m_mode.dll: src/modules/m_mode.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_mode.c $(MODLFLAGS)

src/modules/m_watch.dll: src/modules/m_watch.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_watch.c $(MODLFLAGS)

src/modules/m_part.dll: src/modules/m_part.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_part.c $(MODLFLAGS)

src/modules/m_join.dll: src/modules/m_join.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_join.c $(MODLFLAGS)

src/modules/m_motd.dll: src/modules/m_motd.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_motd.c $(MODLFLAGS)

src/modules/m_opermotd.dll: src/modules/m_opermotd.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_opermotd.c $(MODLFLAGS)

src/modules/m_botmotd.dll: src/modules/m_botmotd.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_botmotd.c $(MODLFLAGS)

src/modules/m_lusers.dll: src/modules/m_lusers.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_lusers.c $(MODLFLAGS)

src/modules/m_names.dll: src/modules/m_names.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_names.c $(MODLFLAGS)

src/modules/m_md.dll: src/modules/m_md.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_md.c $(MODLFLAGS)

src/modules/certfp.dll: src/modules/certfp.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/certfp.c $(MODLFLAGS)

src/modules/cloak.dll: src/modules/cloak.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/cloak.c $(MODLFLAGS)

src/modules/webirc.dll: src/modules/webirc.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/webirc.c $(MODLFLAGS)

src/modules/websocket.dll: src/modules/websocket.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/websocket.c $(MODLFLAGS)

src/modules/blacklist.dll: src/modules/blacklist.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/blacklist.c $(MODLFLAGS)

src/modules/jointhrottle.dll: src/modules/jointhrottle.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/jointhrottle.c $(MODLFLAGS)

src/modules/m_svsnolag.dll: src/modules/m_svsnolag.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_svsnolag.c $(MODLFLAGS)

src/modules/m_starttls.dll: src/modules/m_starttls.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_starttls.c $(MODLFLAGS)

src/modules/m_nopost.dll: src/modules/m_nopost.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_nopost.c $(MODLFLAGS)

src/modules/m_cap.dll: src/modules/m_cap.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_cap.c $(MODLFLAGS)

src/modules/m_sasl.dll: src/modules/m_sasl.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/m_sasl.c $(MODLFLAGS)

src/modules/ssl_antidos.dll: src/modules/ssl_antidos.c $(INCLUDES)
	$(CC) $(MODCFLAGS) src/modules/ssl_antidos.c $(MODLFLAGS)

src/modules/antirandom.dll: src/modules/antirandom.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/antirandom.c $(MODLFLAGS)

src/modules/hideserver.dll: src/modules/hideserver.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/hideserver.c $(MODLFLAGS)

src/modules/jumpserver.dll: src/modules/jumpserver.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/jumpserver.c $(MODLFLAGS)

src/modules/m_ircops.dll: src/modules/m_ircops.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_ircops.c $(MODLFLAGS)

src/modules/m_staff.dll: src/modules/m_staff.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/m_staff.c $(MODLFLAGS)

src/modules/nocodes.dll: src/modules/nocodes.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/nocodes.c $(MODLFLAGS)

src/modules/charsys.dll: src/modules/charsys.c $(INCLUDES)
        $(CC) $(MODCFLAGS) src/modules/charsys.c $(MODLFLAGS)

src/modules/chanmodes/censor.dll: src/modules/chanmodes/censor.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/censor.c $(MODLFLAGS)

src/modules/chanmodes/delayjoin.dll: src/modules/chanmodes/delayjoin.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/delayjoin.c $(MODLFLAGS)

src/modules/chanmodes/floodprot.dll: src/modules/chanmodes/floodprot.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/floodprot.c $(MODLFLAGS)

src/modules/chanmodes/issecure.dll: src/modules/chanmodes/issecure.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/issecure.c $(MODLFLAGS)

src/modules/chanmodes/link.dll: src/modules/chanmodes/link.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/link.c $(MODLFLAGS)

src/modules/chanmodes/nocolor.dll: src/modules/chanmodes/nocolor.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/nocolor.c $(MODLFLAGS)

src/modules/chanmodes/noctcp.dll: src/modules/chanmodes/noctcp.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/noctcp.c $(MODLFLAGS)

src/modules/chanmodes/noinvite.dll: src/modules/chanmodes/noinvite.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/noinvite.c $(MODLFLAGS)

src/modules/chanmodes/nokick.dll: src/modules/chanmodes/nokick.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/nokick.c $(MODLFLAGS)

src/modules/chanmodes/noknock.dll: src/modules/chanmodes/noknock.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/noknock.c $(MODLFLAGS)

src/modules/chanmodes/nonickchange.dll: src/modules/chanmodes/nonickchange.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/nonickchange.c $(MODLFLAGS)

src/modules/chanmodes/nonotice.dll: src/modules/chanmodes/nonotice.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/nonotice.c $(MODLFLAGS)

src/modules/chanmodes/operonly.dll: src/modules/chanmodes/operonly.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/operonly.c $(MODLFLAGS)

src/modules/chanmodes/permanent.dll: src/modules/chanmodes/permanent.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/permanent.c $(MODLFLAGS)

src/modules/chanmodes/regonly.dll: src/modules/chanmodes/regonly.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/regonly.c $(MODLFLAGS)

src/modules/chanmodes/regonlyspeak.dll: src/modules/chanmodes/regonlyspeak.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/regonlyspeak.c $(MODLFLAGS)

src/modules/chanmodes/secureonly.dll: src/modules/chanmodes/secureonly.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/secureonly.c $(MODLFLAGS)

src/modules/chanmodes/stripcolor.dll: src/modules/chanmodes/stripcolor.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/chanmodes/ /Fesrc/modules/chanmodes/ src/modules/chanmodes/stripcolor.c $(MODLFLAGS)

src/modules/usermodes/censor.dll: src/modules/usermodes/censor.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/censor.c $(MODLFLAGS)

src/modules/usermodes/noctcp.dll: src/modules/usermodes/noctcp.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/noctcp.c $(MODLFLAGS)

src/modules/usermodes/bot.dll: src/modules/usermodes/bot.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/bot.c $(MODLFLAGS)

src/modules/usermodes/servicebot.dll: src/modules/usermodes/servicebot.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/servicebot.c $(MODLFLAGS)

src/modules/usermodes/showwhois.dll: src/modules/usermodes/showwhois.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/showwhois.c $(MODLFLAGS)

src/modules/usermodes/privacy.dll: src/modules/usermodes/privacy.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/privacy.c $(MODLFLAGS)

src/modules/usermodes/nokick.dll: src/modules/usermodes/nokick.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/nokick.c $(MODLFLAGS)

src/modules/usermodes/regonlymsg.dll: src/modules/usermodes/regonlymsg.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/regonlymsg.c $(MODLFLAGS)

src/modules/usermodes/privdeaf.dll: src/modules/usermodes/privdeaf.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/privdeaf.c $(MODLFLAGS)

src/modules/usermodes/secureonlymsg.dll: src/modules/usermodes/secureonlymsg.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/usermodes/ /Fesrc/modules/usermodes/ src/modules/usermodes/secureonlymsg.c $(MODLFLAGS)

src/modules/snomasks/dccreject.dll: src/modules/snomasks/dccreject.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/snomasks/ /Fesrc/modules/snomasks/ src/modules/snomasks/dccreject.c $(MODLFLAGS)

src/modules/extbans/account.dll: src/modules/extbans/account.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/account.c $(MODLFLAGS)

src/modules/extbans/inchannel.dll: src/modules/extbans/inchannel.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/inchannel.c $(MODLFLAGS)

src/modules/extbans/join.dll: src/modules/extbans/join.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/join.c $(MODLFLAGS)

src/modules/extbans/nickchange.dll: src/modules/extbans/nickchange.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/nickchange.c $(MODLFLAGS)

src/modules/extbans/quiet.dll: src/modules/extbans/quiet.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/quiet.c $(MODLFLAGS)

src/modules/extbans/realname.dll: src/modules/extbans/realname.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/realname.c $(MODLFLAGS)

src/modules/extbans/regnick.dll: src/modules/extbans/regnick.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/regnick.c $(MODLFLAGS)

src/modules/extbans/operclass.dll: src/modules/extbans/operclass.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/operclass.c $(MODLFLAGS)

src/modules/extbans/certfp.dll: src/modules/extbans/certfp.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/certfp.c $(MODLFLAGS)

src/modules/extbans/textban.dll: src/modules/extbans/textban.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/textban.c $(MODLFLAGS)

src/modules/extbans/msgbypass.dll: src/modules/extbans/msgbypass.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/msgbypass.c $(MODLFLAGS)

src/modules/extbans/timedban.dll: src/modules/extbans/timedban.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/extbans/ /Fesrc/modules/extbans/ src/modules/extbans/timedban.c $(MODLFLAGS)

src/modules/cap/sts.dll: src/modules/cap/sts.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/cap/ /Fesrc/modules/cap/ src/modules/cap/sts.c $(MODLFLAGS)

src/modules/cap/plaintext-policy.dll: src/modules/cap/plaintext-policy.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/cap/ /Fesrc/modules/cap/ src/modules/cap/plaintext-policy.c $(MODLFLAGS)

src/modules/cap/link-security.dll: src/modules/cap/link-security.c $(INCLUDES)
	$(CC) $(MODCFLAGS) /Fosrc/modules/cap/ /Fesrc/modules/cap/ src/modules/cap/link-security.c $(MODLFLAGS)

dummy:
