diff options
author | Alexey Shchepin <alexey@process-one.net> | 2003-07-13 09:00:01 +0000 |
---|---|---|
committer | Alexey Shchepin <alexey@process-one.net> | 2003-07-13 09:00:01 +0000 |
commit | 3131c081550e7eefdfddddb5939145a892863a44 (patch) | |
tree | 10401d00f2ebaaa6592e2c1e53cfca95a56a07ac /src | |
parent | * src/mod_pubsub/mod_pubsub.erl: Added suport for meta-node (diff) |
* doc/guide.tex: Updated (thanks to Sergei Golovan)
* src/expat_erl.c: Added #ifdef for WIN32 (thanks to Sergei
Golovan)
* src/mod_irc/iconv_erl.c: Likewise
* src/configure.erl: Defines ERLANG_DIR variable (thanks to Sergei
Golovan)
* **/Makefile: Use ERLANG_DIR (thanks to Sergei Golovan)
* **/Makefile.win32: Makefiles for windows build (thanks to Sergei
Golovan)
* src/configure.bat: Configuration script for windows (thanks to
Sergei Golovan)
SVN Revision: 123
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/Makefile.win32 | 38 | ||||
-rw-r--r-- | src/configure.bat | 4 | ||||
-rw-r--r-- | src/configure.erl | 3 | ||||
-rw-r--r-- | src/expat_erl.c | 4 | ||||
-rw-r--r-- | src/mod_irc/Makefile | 2 | ||||
-rw-r--r-- | src/mod_irc/Makefile.win32 | 52 | ||||
-rw-r--r-- | src/mod_irc/iconv_erl.c | 3 | ||||
-rw-r--r-- | src/mod_muc/Makefile | 2 | ||||
-rw-r--r-- | src/mod_muc/Makefile.win32 | 20 | ||||
-rw-r--r-- | src/mod_pubsub/Makefile | 2 | ||||
-rw-r--r-- | src/mod_pubsub/Makefile.win32 | 16 |
12 files changed, 142 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile index fe7705f9d..b7496f527 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,7 @@ include Makefile.inc -INCLUDES = -I/usr/lib/erlang/usr/include \ +INCLUDES = -I$(ERLANG_DIR)/usr/include \ -I$(EI_DIR)/include \ -I/usr/local/include diff --git a/src/Makefile.win32 b/src/Makefile.win32 new file mode 100644 index 000000000..fdf9a1324 --- /dev/null +++ b/src/Makefile.win32 @@ -0,0 +1,38 @@ + +include Makefile.inc + +EXPAT_DIR="c:\progra~1\expat-1.95.6" + +ALL : expat_erl.dll + erl -s make all report -noinput -s erlang halt + +CLEAN : + -@erase expat_erl.obj + -@erase vc60.idb + -@erase expat_erl.dll + -@erase expat_erl.exp + -@erase expat_erl.lib + -@erase expat_erl.pch + -@erase *.beam + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "$(ERLANG_DIR)\usr\include" /I "$(EI_DIR)\include" /I "$(EXPAT_DIR)\source\lib" /D "WIN32" /D "NDEBUG" /D "_USRDLL" /D "_MBCS" /Fpexpat_erl.pch /YX /FD /c + +.c.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib "$(ERLANG_DIR)\usr\lib\erl_dll.lib" "$(EI_DIR)\lib\ei.lib" "$(EI_DIR)\lib\erl_interface.lib" "$(EXPAT_DIR)\libs\libexpat.lib" /nologo /subsystem:console /dll /pdb:none /machine:I386 /out:expat_erl.dll +LINK32_OBJS=expat_erl.obj + +expat_erl.dll : $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +SOURCE=expat_erl.c + +expat_erl.obj : $(SOURCE) + diff --git a/src/configure.bat b/src/configure.bat new file mode 100644 index 000000000..931bbc4e5 --- /dev/null +++ b/src/configure.bat @@ -0,0 +1,4 @@ + +erlc configure.erl +erl -s configure -noshell + diff --git a/src/configure.erl b/src/configure.erl index 30c41aa15..fecc19c6e 100644 --- a/src/configure.erl +++ b/src/configure.erl @@ -14,7 +14,8 @@ start() -> EIDirS = "EI_DIR = " ++ code:lib_dir("erl_interface") ++ "\n", - file:write_file("Makefile.inc", list_to_binary(EIDirS)), + RootDirS = "ERLANG_DIR = " ++ code:root_dir() ++ "\n", + file:write_file("Makefile.inc", list_to_binary(EIDirS ++ RootDirS)), halt(). diff --git a/src/expat_erl.c b/src/expat_erl.c index 18eb0471c..a1a950e39 100644 --- a/src/expat_erl.c +++ b/src/expat_erl.c @@ -10,7 +10,6 @@ typedef struct { XML_Parser parser; } expat_data; - void *erlXML_StartElementHandler(expat_data *d, const XML_Char *name, const XML_Char **atts) @@ -147,6 +146,9 @@ ErlDrvEntry expat_driver_entry = { NULL /* F_PTR outputv, reserved */ }; +#ifdef WIN32 +__declspec(dllexport) +#endif DRIVER_INIT(expat_erl) /* must match name in driver_entry */ { return &expat_driver_entry; diff --git a/src/mod_irc/Makefile b/src/mod_irc/Makefile index e5bf89189..60e511896 100644 --- a/src/mod_irc/Makefile +++ b/src/mod_irc/Makefile @@ -2,7 +2,7 @@ include ../Makefile.inc -INCLUDES = -I/usr/lib/erlang/usr/include \ +INCLUDES = -I$(ERLANG_DIR)/usr/include \ -I$(EI_DIR)/include \ -I/usr/local/include diff --git a/src/mod_irc/Makefile.win32 b/src/mod_irc/Makefile.win32 new file mode 100644 index 000000000..515f5432a --- /dev/null +++ b/src/mod_irc/Makefile.win32 @@ -0,0 +1,52 @@ + +include ..\Makefile.inc + +GNUWIN_DIR="c:\progra~1\gnuwin32" + +OUTDIR = .. +EFLAGS = -I .. -pz .. + +OBJS = \ + $(OUTDIR)\iconv.beam \ + $(OUTDIR)\mod_irc.beam \ + $(OUTDIR)\mod_irc_connection.beam + +ALL : $(OUTDIR)\iconv_erl.dll $(OBJS) + +CLEAN : + -@erase $(OUTDIR)\iconv_erl.dll + -@erase $(OUTDIR)\iconv_erl.exp + -@erase $(OUTDIR)\iconv_erl.lib + -@erase iconv_erl.obj + -@erase iconv_erl.pch + -@erase vc60.idb + -@erase *.beam + +$(OUTDIR)\iconv.beam : iconv.erl + erlc -W $(EFLAGS) -o $(OUTDIR) iconv.erl + +$(OUTDIR)\mod_irc.beam : mod_irc.erl + erlc -W $(EFLAGS) -o $(OUTDIR) mod_irc.erl + +$(OUTDIR)\mod_irc_connection.beam : mod_irc_connection.erl + erlc -W $(EFLAGS) -o $(OUTDIR) mod_irc_connection.erl + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "$(ERLANG_DIR)\usr\include" /I "$(EI_DIR)\include" /I "$(GNUWIN_DIR)\include" /D "WIN32" /D "NDEBUG" /D "_USRDLL" /D "_MBCS" /Fpiconv_erl.pch /YX /FD /c + +.c.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib "$(ERLANG_DIR)\usr\lib\erl_dll.lib" "$(EI_DIR)\lib\ei.lib" "$(EI_DIR)\lib\erl_interface.lib" "$(GNUWIN_DIR)\lib\libiconv.lib" /nologo /subsystem:console /dll /pdb:none /machine:I386 /out:$(OUTDIR)\iconv_erl.dll +LINK32_OBJS=iconv_erl.obj + +$(OUTDIR)\iconv_erl.dll : $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +iconv_erl.obj : iconv_erl.c + diff --git a/src/mod_irc/iconv_erl.c b/src/mod_irc/iconv_erl.c index fa382f12e..de9914184 100644 --- a/src/mod_irc/iconv_erl.c +++ b/src/mod_irc/iconv_erl.c @@ -104,6 +104,9 @@ ErlDrvEntry iconv_driver_entry = { NULL /* F_PTR outputv, reserved */ }; +#ifdef WIN32 +__declspec(dllexport) +#endif DRIVER_INIT(iconv_erl) /* must match name in driver_entry */ { return &iconv_driver_entry; diff --git a/src/mod_muc/Makefile b/src/mod_muc/Makefile index b5fb3bf3d..924f5353a 100644 --- a/src/mod_muc/Makefile +++ b/src/mod_muc/Makefile @@ -2,7 +2,7 @@ include ../Makefile.inc -INCLUDES = -I/usr/lib/erlang/usr/include \ +INCLUDES = -I$(ERLANG_DIR)/usr/include \ -I$(EI_DIR)/include \ -I/usr/local/include diff --git a/src/mod_muc/Makefile.win32 b/src/mod_muc/Makefile.win32 new file mode 100644 index 000000000..790032e88 --- /dev/null +++ b/src/mod_muc/Makefile.win32 @@ -0,0 +1,20 @@ + +include ..\Makefile.inc + +OUTDIR = .. +EFLAGS = -I .. -pz .. + +OBJS = \ + $(OUTDIR)\mod_muc.beam \ + $(OUTDIR)\mod_muc_room.beam + +ALL : $(OBJS) + +CLEAN : + -@erase *.beam + +$(OUTDIR)\mod_muc.beam : mod_muc.erl + erlc -W $(EFLAGS) -o $(OUTDIR) mod_muc.erl + +$(OUTDIR)\mod_muc_room.beam : mod_muc_room.erl + erlc -W $(EFLAGS) -o $(OUTDIR) mod_muc_room.erl diff --git a/src/mod_pubsub/Makefile b/src/mod_pubsub/Makefile index 03b835fce..03b4c0814 100644 --- a/src/mod_pubsub/Makefile +++ b/src/mod_pubsub/Makefile @@ -2,7 +2,7 @@ include ../Makefile.inc -INCLUDES = -I/usr/lib/erlang/usr/include \ +INCLUDES = -I$(ERLANG_DIR)/usr/include \ -I$(EI_DIR)/include \ -I/usr/local/include diff --git a/src/mod_pubsub/Makefile.win32 b/src/mod_pubsub/Makefile.win32 new file mode 100644 index 000000000..f2421f5a5 --- /dev/null +++ b/src/mod_pubsub/Makefile.win32 @@ -0,0 +1,16 @@ + +include ..\Makefile.inc + +OUTDIR = .. +EFLAGS = -I .. -pz .. + +OBJS = \ + $(OUTDIR)\mod_pubsub.beam + +ALL : $(OBJS) + +CLEAN : + -@erase *.beam + +$(OUTDIR)\mod_pubsub.beam : mod_pubsub.erl + erlc -W $(EFLAGS) -o $(OUTDIR) mod_pubsub.erl |