From 7c3adef1c8e1f4b78353df6a803eb9cbf46f7f2a Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Sun, 10 Apr 2011 13:21:39 +0200 Subject: [PATCH] Added dependency handling and README.VC --- platform/win32/Makefile.win32 | 4 ++-- platform/win32/README-VC | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 platform/win32/README-VC diff --git a/platform/win32/Makefile.win32 b/platform/win32/Makefile.win32 index 560da313c..1765e9a8d 100644 --- a/platform/win32/Makefile.win32 +++ b/platform/win32/Makefile.win32 @@ -36,8 +36,7 @@ TARGET_LIBFILES = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a CONTIKI_TARGET_DIRS = . cfs ctk loader -CONTIKI_TARGET_SOURCEFILES = contiki-main.c clock.c cfs-win32-dir.c \ - ctk-console.c +CONTIKI_TARGET_SOURCEFILES = contiki-main.c clock.c cfs-win32-dir.c ctk-console.c CONTIKI_SOURCEFILES += $(CTK) cfs-posix.c ctk-conio.c wpcap.c wpcap-drv.c \ $(CONTIKI_TARGET_SOURCEFILES) @@ -88,6 +87,7 @@ VCFLAGS = -Od -Z7 $(filter-out -Wall -g -O,$(CFLAGS)) CUSTOM_RULE_C_TO_OBJECTDIR_O = 1 $(OBJECTDIR)/%.o: %.c cl -nologo $(VCFLAGS) -c $< -Fo$@ + @makedepend $(CFLAGS) -o.o -f- $< 2> nul: | sed -e s!$(<:.c=.o)!$@! -e s!\\!/!g > $(@:.o=.d) CUSTOM_RULE_C_TO_CO = 1 %.co: %.c diff --git a/platform/win32/README-VC b/platform/win32/README-VC new file mode 100644 index 000000000..d0a5009d5 --- /dev/null +++ b/platform/win32/README-VC @@ -0,0 +1,18 @@ +The 'win32' target allows projects to be built using two different toolchains: + +1. GCC / Cygwin + +Start your build from a Cygwin Shell and set TARGET=win32 to use this toolchain. +The result will be similiar to the 'minimal-net' target. The advantage of 'win32' +over 'minimal-net' is the support for GUI applications using the Contiki Toolkit +(CTK). For this reason several projects in the /examples directory are built in +the target 'win32' by default. + +2. VC++ / GnuWin + +Start your build from a VC++ Command Prompt and set TARGET=win32 to use this +toolchain. You need however a few addional tools in your PATH: +- cp.exe / rm.exe (http://gnuwin32.sourceforge.net/packages/coreutils.htm) +- make.exe (http://gnuwin32.sourceforge.net/packages/make.htm) +- sed.exe (http://gnuwin32.sourceforge.net/packages/sed.htm) +- makedepend.exe (http://llg.cubic.org/docs/vc7.html)