beebasm
changeset 29:5d32efc3f4ad
Added code to automatically identify Windows platform with GCC 3 or 4.
| author | RichTW <richtw1@gmail.com> |
|---|---|
| date | Sun Feb 27 16:52:18 2011 +0100 |
| parents | 1347586d66b9 |
| children | d0c893ec6da4 |
| files | demo.ssd src/Makefile src/Makefile.inc |
| diffstat | 3 files changed, 23 insertions(+), 11 deletions(-) [+] |
line diff
1.1 Binary file demo.ssd has changed
2.1 --- a/src/Makefile Sun Feb 27 16:18:43 2011 +0100 2.2 +++ b/src/Makefile Sun Feb 27 16:52:18 2011 +0100 2.3 @@ -51,7 +51,7 @@ 2.4 2.5 # Parameters to the executable 2.6 2.7 -PARAMS := -i ../demo.asm -do ../demo.ssd -boot Code -v 2.8 +PARAMS := -i ../demo.asm -do ../demo.ssd -boot Code 2.9 2.10 2.11
3.1 --- a/src/Makefile.inc Sun Feb 27 16:18:43 2011 +0100 3.2 +++ b/src/Makefile.inc Sun Feb 27 16:52:18 2011 +0100 3.3 @@ -50,6 +50,16 @@ 3.4 endif 3.5 3.6 3.7 +# Declare executable names 3.8 + 3.9 +CC := gcc 3.10 +CXX := gcc 3.11 +LD := gcc 3.12 +MKDIR := mkdir -p 3.13 +RM := rm -f 3.14 +ECHO := @@echo -e 3.15 + 3.16 + 3.17 # List of allowed platform names. 3.18 # Add extra valid platforms to this list as they are supported. 3.19 3.20 @@ -71,6 +81,18 @@ 3.21 PLATFORM := linux 3.22 endif 3.23 3.24 +ifeq ($(OS),Windows_NT) 3.25 +ifeq ($(word 1,$(subst ., ,$(shell $(CC) -dumpversion))),4) 3.26 +PLATFORM := mingw-gcc4 3.27 +else 3.28 +PLATFORM := mingw-gcc3 3.29 +endif 3.30 +endif 3.31 + 3.32 +ifdef PLATFORM 3.33 +$(info Automatically using platform $(PLATFORM)) 3.34 +endif 3.35 + 3.36 endif 3.37 3.38 3.39 @@ -109,16 +131,6 @@ 3.40 endif 3.41 3.42 3.43 -# Declare executable names 3.44 - 3.45 -CC := gcc 3.46 -CXX := gcc 3.47 -LD := gcc 3.48 -MKDIR := mkdir -p 3.49 -RM := rm -f 3.50 -ECHO := @@echo -e 3.51 - 3.52 - 3.53 # Declare default number of CPUs 3.54 3.55 CPUS ?= 1
