Simplified host OS platform detection in Makefiles

This commit is contained in:
Ilya Dmitrichenko 2012-02-21 23:57:22 +00:00 committed by David Kopf
parent 745f071c98
commit 9c99d46e24
17 changed files with 66 additions and 134 deletions

View file

@ -1,15 +1,5 @@
# $Id: Makefile.avr,v 1.27 2010/12/22 21:13:09 dak664 Exp $
### Check if we are running under Windows
ifndef WINDIR
ifdef OS
ifneq (,$(findstring Windows,$(OS)))
WINDIR := Windows
endif
endif
endif
.SUFFIXES:
### Optimization setting. $make OPTI=0 for easier debugging of changed source file(s)

View file

@ -72,8 +72,7 @@ CUSTOM_RULE_C_TO_O=yes
CFLAGS += -I$(OBJECTDIR) -I$(CONTIKI_CPU)/board -DBOARD=$(TARGET)
$(OBJECTDIR)/board.h: $(OBJECTDIR)
ifneq (,$(findstring Windows,$(OS)))
${info Cygwin detected.}
ifeq ($(HOST_OS),Windows)
ln -f $(CONTIKI_CPU)/board/board.h $(OBJECTDIR)/board.h
else
ln -sf ../$(CONTIKI_CPU)/board/board.h $(OBJECTDIR)/board.h

View file

@ -166,10 +166,8 @@ endif
FLASHER = $(CONTIKI)/tools/stm32w/stm32w_flasher/stm32w_flasher
# Check if we are running under Windows
ifdef OS
ifneq (,$(findstring Windows,$(OS)))
FLASHER = $(CONTIKI)/tools/stm32w/stm32w_flasher/stm32w_flasher.exe
endif
ifeq ($(HOST_OS),Windows)
FLASHER = $(CONTIKI)/tools/stm32w/stm32w_flasher/stm32w_flasher.exe
endif