summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefiles/nmake/clean.mk3
-rw-r--r--makefiles/nmake/compiler.mk10
-rw-r--r--makefiles/nmake/wolf.mc0
-rw-r--r--src/Makefile.W3214
-rw-r--r--src/wolfmsg.mc64
5 files changed, 87 insertions, 4 deletions
diff --git a/makefiles/nmake/clean.mk b/makefiles/nmake/clean.mk
index 95db671..f7cdb2b 100644
--- a/makefiles/nmake/clean.mk
+++ b/makefiles/nmake/clean.mk
@@ -34,6 +34,9 @@ clean: clean_recursive local_clean
-@erase *.obj 2>NUL
-@erase $(OBJS) 2>NUL
-@erase *.pdb 2>NUL
+ -@erase *.rc 2>NUL
+ -@erase *.res 2>NUL
+ -@erase MSG*.bin 2>NUL
distclean_recursive:
@if not "$(SUBDIRS)" == "" @for %%d IN ( $(SUBDIRS) ) do @cd %%d & $(MAKE) /nologo /f Makefile.w32 distclean & cd ..
diff --git a/makefiles/nmake/compiler.mk b/makefiles/nmake/compiler.mk
index c21b222..4006124 100644
--- a/makefiles/nmake/compiler.mk
+++ b/makefiles/nmake/compiler.mk
@@ -27,13 +27,15 @@ CFLAGS = $(COMPILE_FLAGS) $(PLATFORM_COMPILE_FLAGS) $(DEBUGLEVELFLAGS)
CCPPFLAGS = $(CCPP_COMPILE_FLAGS) $(PLATFORM_COMPILE_FLAGS) $(DEBUGLEVELFLAGS)
CC = cl.exe
CCPP = cl.exe
+MC = "$(PLATFORM_SDK_DIR)\Bin\mc.exe"
+RC = "$(PLATFORM_SDK_DIR)\Bin\rc.exe"
LDFLAGS = /nologo $(INCLUDE_LDFLAGS)
LIBS = $(INCLUDE_LIBS)
LINK = link.exe
CCPP_LINK = link.exe
-.SUFFIXES: .c .cpp .obj .exe
+.SUFFIXES: .c .cpp .obj .exe .mc .rc .res
.c.obj:
$(CC) $(CFLAGS) /Fo$@ $<
@@ -44,6 +46,12 @@ CCPP_LINK = link.exe
.obj.exe:
$(CCPP_LINK) $(LDFLAGS) $(LIBS) /out:$@ $< $(OBJS)
+.mc.rc:
+ $(MC) $<
+
+.rc.res:
+ $(RC) $<
+
#%$(EXE): %.o $(OBJS) $(TEST_OBJS)
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(TEST_OBJS) $< $(LIBS)
diff --git a/makefiles/nmake/wolf.mc b/makefiles/nmake/wolf.mc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/makefiles/nmake/wolf.mc
diff --git a/src/Makefile.W32 b/src/Makefile.W32
index fa4c824..472fc4a 100644
--- a/src/Makefile.W32
+++ b/src/Makefile.W32
@@ -8,7 +8,9 @@ INCLUDE_DIRS = \
BINS =
-LIBRARIES = wolf.lib
+LIBRARIES = \
+ wolf.lib \
+ wolfmsg.dll
PORT_OBJS = \
port\string.obj \
@@ -26,12 +28,18 @@ local_all: $(LIBRARIES)
!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk
wolf.lib: $(OBJS)
- link.exe /lib /nologo /out:$@ $(LDFLAGS) $(LIBS) $?
+ $(LINK) /lib /out:$@ $(LDFLAGS) $(LIBS) $?
+
+wolfmsg.dll: wolfmsg.res
+ $(LINK) /dll /noentry /out:$@ $?
+
+wolfmsg.rc: wolfmsg.mc
+wolfmsg.res: wolfmsg.rc
local_all:
local_clean:
- @-erase $(LIBRARIES) 2>NUL
+ @-erase $(LIBRARIES) wolfmsg.h 2>NUL
local_distclean:
diff --git a/src/wolfmsg.mc b/src/wolfmsg.mc
new file mode 100644
index 0000000..1ced225
--- /dev/null
+++ b/src/wolfmsg.mc
@@ -0,0 +1,64 @@
+;// messages file for wolf messages
+
+;// the type used in the event id constants generated
+;// (32=bit wide at least, we wan't to user those ids
+;// also in the Unix code, so defining it to something
+;// POSIXish)
+MessageIdTypedef = uint32_t
+
+;// event log severity levels (severity bits)
+SeverityNames = (
+ Success = 0x0 : STATUS_SEVERITY_SUCCESS
+ Informational = 0x1 : STATUS_SEVERITY_INFORMATIONAL
+ Warning = 0x2 : STATUS_SEVERITY_WARNING
+ Error = 0x3 : STATUS_SEVERITY_ERROR
+)
+
+;// facility names
+FacilityNames = (
+ System = 0x0 : FACILITY_SYSTEM
+ Runtime = 0x2 : FACILITY_RUNTIME
+ Stubs = 0x3 : FACILITY_STUBS
+ Io = 0x4 : FACILITY_IO_ERROR_CODE
+)
+
+;// language codes for translated messages
+LanguageNames = (
+ English = 0x409 : MSG00409
+)
+
+;// Category names come first, the 'CategoryCount' registry entry
+;// for the event source must match the number of entries here.
+;// Also the numbering must be strictly starting by one and increase
+;// by one.
+
+MessageId = 0x1
+SymbolicName = WOLF_CATEGORY_1
+Language = English
+Wolf Category 1
+.
+
+MessageId = 0x2
+SymbolicName = WOLF_CATEGORY_2
+Language = English
+Wolf Category 2
+.
+
+;// event messages from here
+
+MessageId = 0x100
+Severity = Error
+Facility = Runtime
+SymbolicName = WOLF_TEST_NO_PARAMS
+Language = English
+This is a test message without any parameters
+It can be two lines though
+.
+
+MessageId = 0x101
+Severity = Error
+Facility = Runtime
+SymbolicName = WOLF_TEST_PARAMS
+Language = English
+This is a message with parameter %1 and parameter %2
+.