diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-02-26 21:35:14 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-02-26 21:35:14 +0100 |
commit | 70f0a6f2dcd66f3ec23f79220a0e08bcae8ba5ea (patch) | |
tree | 93580e86f18f5c2f580da611c56afc95044841e7 | |
parent | 501aa50d06744cadeed3adc46bde461ceb5696e8 (diff) | |
download | wolfbones-70f0a6f2dcd66f3ec23f79220a0e08bcae8ba5ea.tar.gz wolfbones-70f0a6f2dcd66f3ec23f79220a0e08bcae8ba5ea.tar.bz2 |
manual linking and running test_log.exe ok
-rw-r--r-- | makefiles/nmake/clean.mk | 16 | ||||
-rw-r--r-- | makefiles/nmake/compiler.mk | 6 | ||||
-rw-r--r-- | src/Makefile.W32 | 23 | ||||
-rw-r--r-- | src/log.c | 6 | ||||
-rw-r--r-- | tests/log/GNUmakefile | 2 | ||||
-rw-r--r-- | tests/log/Makefile.W32 | 27 |
6 files changed, 49 insertions, 31 deletions
diff --git a/makefiles/nmake/clean.mk b/makefiles/nmake/clean.mk index 19cc006..5740dff 100644 --- a/makefiles/nmake/clean.mk +++ b/makefiles/nmake/clean.mk @@ -26,14 +26,14 @@ # -@rm $(CMODULES) $(CPPMODULES) # -@rm $(CMODULES .o=.d) $(CPPMODULES .o=.d) clean: - -@erase *.bak - -@erase *~ - -@erase *.d - -@erase *.exe - -@erase *.exe.manifest - -@erase *.obj - -@erase $(OBJS) - -@erase *.pdb + -@erase *.bak 2>NUL + -@erase *~ 2>NUL + -@erase *.d 2>NUL + -@erase *.exe 2>NUL + -@erase *.exe.manifest 2>NUL + -@erase *.obj 2>NUL + -@erase $(OBJS) 2>NUL + -@erase *.pdb 2>NUL #.PHONY: distclean_recursive distclean local_distclean diff --git a/makefiles/nmake/compiler.mk b/makefiles/nmake/compiler.mk index 22e30a5..fa4fd74 100644 --- a/makefiles/nmake/compiler.mk +++ b/makefiles/nmake/compiler.mk @@ -22,8 +22,8 @@ CCPPFLAGS = $(CCPP_COMPILE_FLAGS) $(PLATFORM_COMPILE_FLAGS) $(DEBUGLEVELFLAGS) CC = cl.exe CCPP = cl.exe -LDFLAGS = /nologo $(LDFLAGS_DIR) -LIBS = $(LIBS_DIR) +LDFLAGS = /nologo $(INCLUDE_LDFLAGS) +LIBS = $(INCLUDE_LIBS) LINK = link.exe CCPP_LINK = link.exe @@ -36,7 +36,7 @@ CCPP_LINK = link.exe $(CCPP) $(CCPPFLAGS) $< .obj.exe: - $(CCPP_LINK) $(LDFLAGS) /out:$@ $< $(OBJS) + $(CCPP_LINK) $(LDFLAGS) $(LIBS) /out:$@ $< $(OBJS) #%$(EXE): %.o $(OBJS) # $(CCPP_LINK) -o $@ $(LIBS) $(OBJS) $< diff --git a/src/Makefile.W32 b/src/Makefile.W32 index a3b4242..7947efd 100644 --- a/src/Makefile.W32 +++ b/src/Makefile.W32 @@ -6,7 +6,7 @@ INCLUDE_DIRS = /I$(TOPDIR)\include\wolf /I. BINS = -LIBS = libwolf.a +LIBS = wolf.lib PORT_OBJS = \ port\string.obj @@ -18,29 +18,16 @@ OBJS = \ $(PORT_OBJS) \ $(COMMON_OBJS) -# compiler.mk -LINK = link.exe -CPP_LINK = link.exe - -all: $(OBJS) $(CPP_BINS) +local_all: $(LIBS) !INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk -test1.exe: test1.obj -test2.exe: test2.obj -test3.exe: test3.obj -typeof1.exe: typeof1.obj -test4.exe: test4.obj +wolf.lib: $(OBJS) + link.exe /lib /nologo /out:$@ $? local_all: local_clean: + @erase $LIBS) 2>NUL local_distclean: - -test: $(CPP_BINS) - test1 - test2 - test3 - typeof1 - test4 @@ -340,9 +340,11 @@ void wolf_log_closelogtofile( void ) { } } +#if defined HAVE_SYSLOG_H void wolf_log_closelogtosyslog( void ) { closelog( ); } +#endif /* defined HAVE_SYSLOG_H */ void wolf_log_closelogtostderr( void ) { /* do nothing here */ @@ -362,10 +364,12 @@ void wolf_log_reopenlogtofile( void ) { } } +#if defined HAVE_SYSLOG_H void wolf_log_reopenlogtosyslog( void ) { openlog( syslog_ident, syslog_options, syslog_facility ); setlogmask( LOG_UPTO( syslog_level ) ); } +#endif /* defined HAVE_SYSLOG_H */ void WOLF_LOG( wolf_log_level_t level, const char *format, ... ) { va_list ap; @@ -384,5 +388,7 @@ void WOLF_LOG( wolf_log_level_t level, const char *format, ... ) { } } +#if defined HAVE_SYSLOG_H syslog( level, "%s", s ); +#endif /* defined HAVE_SYSLOG_H */ } diff --git a/tests/log/GNUmakefile b/tests/log/GNUmakefile index 52540e5..316ea68 100644 --- a/tests/log/GNUmakefile +++ b/tests/log/GNUmakefile @@ -13,8 +13,6 @@ TEST_BINS = \ -include $(TOPDIR)/makefiles/gmake/sub.mk -testd: $(TOPDIR)/src/libwolf.a - local_test: @echo "Testing log.." @./test_log >/dev/null 2>&1 diff --git a/tests/log/Makefile.W32 b/tests/log/Makefile.W32 new file mode 100644 index 0000000..d5134c0 --- /dev/null +++ b/tests/log/Makefile.W32 @@ -0,0 +1,27 @@ +TOPDIR = ..\.. + +SUBDIRS = + +INCLUDE_DIRS = \ + /I$(TOPDIR)\include /I. + +INCLUDE_LIBS = \ + $(TOPDIR)\src\wolf.lib + +TEST_BINS = \ + test_log.exe + +!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk + +test_log.exe: test_log.obj $(TOPDIR)\src\wolf.lib + +local_test: + @echo "Testing log.." + @test_log >/dev/null 2>&1 + +local_all: + +local_clean: + @erase test.log 2>NUL + +local_distclean: |