Revision: 3664
Author:
robert.d...@gmail.com
Date: Tue Jul 7 14:03:00 2015 UTC
Log: MatrixPilot_beta: move the makefile includes into tools
subdirectory (consistent with trunk), add link library specification option
to project generator.
https://code.google.com/p/gentlenav/source/detail?r=3664
Added:
/branches/MatrixPilot_beta/Tools/makefiles
/branches/MatrixPilot_beta/Tools/makefiles/device-AUAV3.mk
/branches/MatrixPilot_beta/Tools/makefiles/device-JSB.mk
/branches/MatrixPilot_beta/Tools/makefiles/device-PX4.mk
/branches/MatrixPilot_beta/Tools/makefiles/device-SIL.mk
/branches/MatrixPilot_beta/Tools/makefiles/device-UDB4.mk
/branches/MatrixPilot_beta/Tools/makefiles/device-UDB5.mk
/branches/MatrixPilot_beta/Tools/makefiles/target-LedTest.mk
/branches/MatrixPilot_beta/Tools/makefiles/target-MatrixPilot.mk
/branches/MatrixPilot_beta/Tools/makefiles/target-RollPitchYaw.mk
/branches/MatrixPilot_beta/Tools/makefiles/toolchain-ARM.mk
/branches/MatrixPilot_beta/Tools/makefiles/toolchain-C30.mk
/branches/MatrixPilot_beta/Tools/makefiles/toolchain-GCC.mk
/branches/MatrixPilot_beta/Tools/makefiles/toolchain-XC16.mk
Deleted:
/branches/MatrixPilot_beta/device-AUAV3.mk
/branches/MatrixPilot_beta/device-PX4.mk
/branches/MatrixPilot_beta/device-SIL.mk
/branches/MatrixPilot_beta/device-UDB4.mk
/branches/MatrixPilot_beta/device-UDB5.mk
/branches/MatrixPilot_beta/target-LedTest.mk
/branches/MatrixPilot_beta/target-MatrixPilot.mk
/branches/MatrixPilot_beta/target-RollPitchYaw.mk
/branches/MatrixPilot_beta/toolchain-ARM.mk
/branches/MatrixPilot_beta/toolchain-C30.mk
/branches/MatrixPilot_beta/toolchain-GCC.mk
/branches/MatrixPilot_beta/toolchain-XC16.mk
Modified:
/branches/MatrixPilot_beta/Tools/Build/proj_gen.bat
/branches/MatrixPilot_beta/Tools/Build/pyProjectCreator.py
/branches/MatrixPilot_beta/Tools/Build/template.vcxproj
/branches/MatrixPilot_beta/Tools/Build/template.vcxproj.filters
/branches/MatrixPilot_beta/Tools/MatrixPilot-SIL/
module.mk
/branches/MatrixPilot_beta/makefile
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/device-AUAV3.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,12 @@
+# this file is included from makefile
+
+#TOOLCHAIN ?= C30
+TOOLCHAIN ?= XC16
+TARGET_TYPE := hex
+CPU := 33EP512MU810
+
+modules += libUDB libVectorMatrix libFlashFS Microchip
+incpath += Microchip Microchip/Include libVectorMatrix
+#cfgpath := Config
+
+#defines += USE_USB USE_CDC USE_MSD USE_FILESYS
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/device-JSB.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,16 @@
+# this file is included from makefile
+
+TOOLCHAIN := GCC
+ifeq ($(OS),Windows_NT)
+TARGET_TYPE := exe
+else
+TARGET_TYPE := out
+endif
+CPU :=
+
+modules += Tools/MatrixPilot-JSB Tools/JSB-SIL
+incpath += Tools/JSBSimLib/src
+#cfgpath := Config
+addlibs := ../Tools/JSBSimLib/Debug/JSBSimLib.lib
+defines += JSB_SIL
+#defines += USE_MAVLINK=1 USE_TELEMETRY=1
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/device-PX4.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,18 @@
+# this file is included from makefile
+
+TOOLCHAIN ?= ARM
+TARGET_TYPE := px4
+ARCH := armv7e-m
+CPU := cortex-m4
+FPU := fpv4-sp-d16
+TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb -mlong-calls
+#TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb-interwork -mlong-calls
+
+modules += libSTM
+
+#incpath := Config FreeRTOS\include libUDB libSTM libSTM\inc libSTM\src
libSTM\cmsis libSTM\Drivers
libSTM\Drivers\CMSIS\Device\ST\STM32F4xx\Include
libSTM\Drivers\CMSIS\Include libSTM\Drivers\STM32F4xx_HAL_Driver\Inc
libSTM\Middlewares libSTM\Middlewares\Third_Party\FreeRTOS\Source\include
libSTM\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS
libSTM\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F
+#incpath := Config FreeRTOS/include libUDB libSTM
+incpath += libSTM
+#cfgpath := Config
+
+defines += ARM_MATH_CM4 __FPU_USED STM32F401RE STM32F4XX
USE_STDPERIPH_DRIVER STM32F401xE
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/device-SIL.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,15 @@
+# this file is included from makefile
+
+TOOLCHAIN := GCC
+ifeq ($(OS),Windows_NT)
+TARGET_TYPE := exe
+else
+TARGET_TYPE := out
+endif
+CPU :=
+
+modules += Tools/MatrixPilot-SIL
+incpath +=
+#cfgpath := Config
+
+#defines += USE_MAVLINK=1 USE_TELEMETRY=1
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/device-UDB4.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,13 @@
+# this file is included from makefile
+
+TOOLCHAIN ?= XC16
+TARGET_TYPE := hex
+CPU := 33FJ256GP710A
+
+modules += libUDB libVectorMatrix libFlashFS Microchip
+incpath += Microchip Microchip/Include libVectorMatrix
+#cfgpath := Config
+
+# mod_list
+# inc_list
+# def_list
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/device-UDB5.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,11 @@
+# this file is included from makefile and the project generator python
script
+# note: the project generator is not make, and hence does not obey make
syntax
+# lines are matched as tokens once only, so do not use repeated +=
+#
+TOOLCHAIN ?= XC16
+TARGET_TYPE := hex
+CPU := 33FJ256GP710A
+
+modules += libUDB libVectorMatrix libFlashFS Microchip
+incpath += Microchip Microchip/Include libVectorMatrix
+#cfgpath := Config
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/target-LedTest.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,5 @@
+# this file is included from makefile
+
+modules := Tools/LedTest
+incpath :=
+cfgpath := Tools/LedTest/Config
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/target-MatrixPilot.mk Tue
Jul 7 14:03:00 2015 UTC
@@ -0,0 +1,10 @@
+# this file is included from makefile
+
+modules := MatrixPilot MAVLink libDCM
+incpath := MAVLink/include
+cfgpath := Config
+
+#defines := FOO
+#devices := UDB4 UDB5 AUAV3 SIL PX4
+#targets :=
+#toolchains := C30 XC16 GCC ARM
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/target-RollPitchYaw.mk Tue
Jul 7 14:03:00 2015 UTC
@@ -0,0 +1,5 @@
+# this file is included from makefile
+
+modules := RollPitchYaw libDCM
+incpath :=
+cfgpath := RollPitchYaw/Config
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/toolchain-ARM.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,21 @@
+# this file is included from makefile
+
+CC := arm-none-eabi-gcc
+ASM := arm-none-eabi-as
+LINK := arm-none-eabi-gcc
+OBJCOPY := arm-none-eabi-objcopy
+MKFW := $(SOURCE_DIR)/libSTM/px_mkfw.py
+LSCRIPT := $(SOURCE_DIR)/libSTM/stm32f401xe.ld
+#LFLAGS := -T .\gcc.ld -Wl,-Map,$(BINDIR)\$(TARGET_NAME).map
+LFLAGS := -T $(LSCRIPT) -Wl,-Map,$(TARGET_MAP)
+LIBS := -lgcc -lc -lm -lrdimon
+#QT := "
+#LINKFLAGS = -T .\$(APP_NAME).ld -o $(BINDIR)\$(APP_NAME).elf
-Wl,-Map,$(BINDIR)\$(APP_NAME).map,--cref -lm
+
+# Define optimisation level here
+OPT = -O0
+#OPT = -O2 -falign-functions=16 -fno-inline -fomit-frame-pointer
+
+CFLAGS := $(OPT) -gdwarf-2 -Wall -Wstrict-prototypes
+CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
+#CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
-Wa,-ahlms=$(<:.c=.lst)
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/toolchain-C30.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,11 @@
+# this file is included from makefile
+
+CC := pic30-gcc.exe
+AR := pic30-ar.exe
+BIN2HEX := pic30-bin2hex.exe
+LIBS := -legacy-libc
+TARGET_ARCH := -mcpu=$(CPU)
+AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
+CFLAGS += -x c -g -Wall -mlarge-code -mlarge-data -legacy-libc
+#LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)",--report-mem
+LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)"
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/toolchain-GCC.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,12 @@
+# this file is included from makefile
+
+CC := gcc
+ifeq ($(OS),Windows_NT)
+LIBS := -lws2_32
+TARGET_ARCH :=
+CFLAGS += -DWIN=1
+else
+LIBS := -lm
+TARGET_ARCH :=
+CFLAGS += -DNIX=1
+endif
=======================================
--- /dev/null
+++ /branches/MatrixPilot_beta/Tools/makefiles/toolchain-XC16.mk Tue Jul 7
14:03:00 2015 UTC
@@ -0,0 +1,10 @@
+# this file is included from makefile
+
+CC := xc16-gcc
+AR := xc16-ar
+BIN2HEX := xc16-bin2hex
+LIBS := -legacy-libc
+TARGET_ARCH := -mcpu=$(CPU)
+AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
+CFLAGS += -g -omf=elf -legacy-libc -msmart-io=1 -Wall -msfr-warn=off
-mlarge-code -mlarge-data
+LFLAGS += -omf=elf
-Wl,-script=p$(CPU).gld,--heap=256,--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,-Map="$(TARGET_MAP)"
=======================================
--- /branches/MatrixPilot_beta/device-AUAV3.mk Sat May 16 13:15:19 2015 UTC
+++ /dev/null
@@ -1,12 +0,0 @@
-# this file is included from makefile
-
-#TOOLCHAIN ?= C30
-TOOLCHAIN ?= XC16
-TARGET_TYPE := hex
-CPU := 33EP512MU810
-
-modules += libUDB libVectorMatrix libFlashFS Microchip
-incpath += Microchip Microchip/Include libVectorMatrix
-#cfgpath := Config
-
-#defines += USE_USB USE_CDC USE_MSD USE_FILESYS
=======================================
--- /branches/MatrixPilot_beta/device-PX4.mk Sun Feb 22 12:45:47 2015 UTC
+++ /dev/null
@@ -1,18 +0,0 @@
-# this file is included from makefile
-
-TOOLCHAIN ?= ARM
-TARGET_TYPE := px4
-ARCH := armv7e-m
-CPU := cortex-m4
-FPU := fpv4-sp-d16
-TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb -mlong-calls
-#TARGET_ARCH := -mcpu=$(CPU) -march=$(ARCH) -mfpu=$(FPU) -mfloat-abi=hard
-mthumb-interwork -mlong-calls
-
-modules += libSTM
-
-#incpath := Config FreeRTOS\include libUDB libSTM libSTM\inc libSTM\src
libSTM\cmsis libSTM\Drivers
libSTM\Drivers\CMSIS\Device\ST\STM32F4xx\Include
libSTM\Drivers\CMSIS\Include libSTM\Drivers\STM32F4xx_HAL_Driver\Inc
libSTM\Middlewares libSTM\Middlewares\Third_Party\FreeRTOS\Source\include
libSTM\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS
libSTM\Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F
-#incpath := Config FreeRTOS/include libUDB libSTM
-incpath += libSTM
-#cfgpath := Config
-
-defines += ARM_MATH_CM4 __FPU_USED STM32F401RE STM32F4XX
USE_STDPERIPH_DRIVER STM32F401xE
=======================================
--- /branches/MatrixPilot_beta/device-SIL.mk Sat May 16 13:15:19 2015 UTC
+++ /dev/null
@@ -1,15 +0,0 @@
-# this file is included from makefile
-
-TOOLCHAIN := GCC
-ifeq ($(OS),Windows_NT)
-TARGET_TYPE := exe
-else
-TARGET_TYPE := out
-endif
-CPU :=
-
-modules += Tools/MatrixPilot-SIL
-incpath +=
-#cfgpath := Config
-
-#defines += USE_MAVLINK=1 USE_TELEMETRY=1
=======================================
--- /branches/MatrixPilot_beta/device-UDB4.mk Wed Apr 1 01:43:36 2015 UTC
+++ /dev/null
@@ -1,13 +0,0 @@
-# this file is included from makefile
-
-TOOLCHAIN ?= XC16
-TARGET_TYPE := hex
-CPU := 33FJ256GP710A
-
-modules += libUDB libVectorMatrix libFlashFS Microchip
-incpath += Microchip Microchip/Include libVectorMatrix
-#cfgpath := Config
-
-# mod_list
-# inc_list
-# def_list
=======================================
--- /branches/MatrixPilot_beta/device-UDB5.mk Sat May 16 13:15:19 2015 UTC
+++ /dev/null
@@ -1,11 +0,0 @@
-# this file is included from makefile and the project generator python
script
-# note: the project generator is not make, and hence does not obey make
syntax
-# lines are matched as tokens once only, so do not use repeated +=
-#
-TOOLCHAIN ?= XC16
-TARGET_TYPE := hex
-CPU := 33FJ256GP710A
-
-modules += libUDB libVectorMatrix libFlashFS Microchip
-incpath += Microchip Microchip/Include libVectorMatrix
-#cfgpath := Config
=======================================
--- /branches/MatrixPilot_beta/target-LedTest.mk Tue Mar 24 15:46:09 2015
UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-# this file is included from makefile
-
-modules := Tools/LedTest
-incpath :=
-cfgpath := Tools/LedTest/Config
=======================================
--- /branches/MatrixPilot_beta/target-MatrixPilot.mk Sat May 16 13:15:19
2015 UTC
+++ /dev/null
@@ -1,10 +0,0 @@
-# this file is included from makefile
-
-modules := MatrixPilot MAVLink libDCM
-incpath := MAVLink/include
-cfgpath := Config
-#defines := FOO
-
-#devices := UDB4 UDB5 AUAV3 SIL PX4
-#targets :=
-#toolchains := C30 XC16 GCC ARM
=======================================
--- /branches/MatrixPilot_beta/target-RollPitchYaw.mk Sun Feb 22 12:45:47
2015 UTC
+++ /dev/null
@@ -1,5 +0,0 @@
-# this file is included from makefile
-
-modules := RollPitchYaw libDCM
-incpath :=
-cfgpath := RollPitchYaw/Config
=======================================
--- /branches/MatrixPilot_beta/toolchain-ARM.mk Sat May 16 13:15:19 2015 UTC
+++ /dev/null
@@ -1,21 +0,0 @@
-# this file is included from makefile
-
-CC := arm-none-eabi-gcc
-ASM := arm-none-eabi-as
-LINK := arm-none-eabi-gcc
-OBJCOPY := arm-none-eabi-objcopy
-MKFW := $(SOURCE_DIR)/libSTM/px_mkfw.py
-LSCRIPT := $(SOURCE_DIR)/libSTM/stm32f401xe.ld
-#LFLAGS := -T .\gcc.ld -Wl,-Map,$(BINDIR)\$(TARGET_NAME).map
-LFLAGS := -T $(LSCRIPT) -Wl,-Map,$(TARGET_MAP)
-LIBS := -lgcc -lc -lm -lrdimon
-#QT := "
-#LINKFLAGS = -T .\$(APP_NAME).ld -o $(BINDIR)\$(APP_NAME).elf
-Wl,-Map,$(BINDIR)\$(APP_NAME).map,--cref -lm
-
-# Define optimisation level here
-OPT = -O0
-#OPT = -O2 -falign-functions=16 -fno-inline -fomit-frame-pointer
-
-CFLAGS := $(OPT) -gdwarf-2 -Wall -Wstrict-prototypes
-CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
-#CFLAGS += -fverbose-asm -ffunction-sections -fdata-sections
-Wa,-ahlms=$(<:.c=.lst)
=======================================
--- /branches/MatrixPilot_beta/toolchain-C30.mk Sun Feb 22 12:45:47 2015 UTC
+++ /dev/null
@@ -1,11 +0,0 @@
-# this file is included from makefile
-
-CC := pic30-gcc.exe
-AR := pic30-ar.exe
-BIN2HEX := pic30-bin2hex.exe
-LIBS := -legacy-libc
-TARGET_ARCH := -mcpu=$(CPU)
-AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
-CFLAGS += -x c -g -Wall -mlarge-code -mlarge-data -legacy-libc
-#LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)",--report-mem
-LFLAGS += -Wl,-Tp$(CPU).gld,-Map="$(TARGET_MAP)"
=======================================
--- /branches/MatrixPilot_beta/toolchain-GCC.mk Sun Feb 22 12:45:47 2015 UTC
+++ /dev/null
@@ -1,12 +0,0 @@
-# this file is included from makefile
-
-CC := gcc
-ifeq ($(OS),Windows_NT)
-LIBS := -lws2_32
-TARGET_ARCH :=
-CFLAGS += -DWIN=1
-else
-LIBS := -lm
-TARGET_ARCH :=
-CFLAGS += -DNIX=1
-endif
=======================================
--- /branches/MatrixPilot_beta/toolchain-XC16.mk Sun Feb 22 12:45:47 2015
UTC
+++ /dev/null
@@ -1,10 +0,0 @@
-# this file is included from makefile
-
-CC := xc16-gcc
-AR := xc16-ar
-BIN2HEX := xc16-bin2hex
-LIBS := -legacy-libc
-TARGET_ARCH := -mcpu=$(CPU)
-AFLAGS += -Wa,-g,--defsym=PSV_ERRATA=1
-CFLAGS += -g -omf=elf -legacy-libc -msmart-io=1 -Wall -msfr-warn=off
-mlarge-code -mlarge-data
-LFLAGS += -omf=elf
-Wl,-script=p$(CPU).gld,--heap=256,--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,-Map="$(TARGET_MAP)"
=======================================
--- /branches/MatrixPilot_beta/Tools/Build/proj_gen.bat Mon May 25 21:52:05
2015 UTC
+++ /branches/MatrixPilot_beta/Tools/Build/proj_gen.bat Tue Jul 7 14:03:00
2015 UTC
@@ -1,5 +1,8 @@
@echo off
+pyProjectCreator.py -r ../.. -n MatrixPilot -t JSB -c Config/Cessna
+
+goto END:
pyProjectCreator.py -r ../.. -n MatrixPilot -t SIL -c Config/Cessna
@@ -19,7 +22,6 @@
pyProjectCreator.py -r ../.. -n LedTest -t UDB5
pyProjectCreator.py -r ../.. -n LedTest -t AUAV3
-goto END:
:END
pause
=======================================
--- /branches/MatrixPilot_beta/Tools/Build/pyProjectCreator.py Mon May 25
21:52:05 2015 UTC
+++ /branches/MatrixPilot_beta/Tools/Build/pyProjectCreator.py Tue Jul 7
14:03:00 2015 UTC
@@ -163,8 +163,10 @@
def vs2010_scan_dirs(masks, sources, directories):
str = ""
for dir in directories:
+# print "dir = ", dir
path = os.path.join(rootdir, dir)
for mask in masks:
+# print "mask = ", mask
files = find(mask, path)
for filename in files:
if sources == 1:
@@ -181,6 +183,7 @@
files = find(mask, path)
for filename in files:
fname = filename.replace("/", "\\")
+# print "fname = ", prefix + os.path.dirname(fname.replace("..\\", ""))
if sources == 1:
source_folders.append(os.path.dirname(filename.replace("..\\", "")))
str = str + " <ClCompile Include=\"" + fname + "\">\n"
@@ -203,7 +206,7 @@
s = s + " </Filter>\n"
return s
-def vs2010_project(mcu_type, target_board, root_sep, config_dir, includes,
header_files, source_files, project, defines, prjname):
+def vs2010_project(mcu_type, target_board, root_sep, config_dir, includes,
header_files, source_files, project, defines, prjname, addlibs):
config = ''
for e in config_dir:
@@ -217,6 +220,7 @@
data = data.replace("%%CONFIG%%", config)
data = data.replace("%%PROJECT%%", prjname)
data = data.replace("%%INCLUDES%%", includes)
+ data = data.replace("%%LINK_LIBS%%", addlibs)
data = data.replace("%%SOURCE_FILES%%", source_files)
data = data.replace("%%HEADER_FILES%%", header_files)
# data = data.replace("%%EXTRA_DEFS%%", defines.strip(";"))
@@ -397,6 +401,7 @@
else:
arch = ""
+ addlibs_list = []
#
# Parse options from the 'target-*.mk' specific makefile
target_mk_path = opts.root + "/target-" +
opts.name + ".mk"
@@ -405,6 +410,7 @@
opts.includes = parse_mk_file(target_mk_path, "incpath", opts.includes)
opts.config = parse_mk_file(target_mk_path, "cfgpath", opts.config)
+ print "target = ", opts.target
#
# Parse extra options from the 'device-*.mk' specific makefile
opts.file = opts.root + "/device-" + opts.target + ".mk"
@@ -412,12 +418,13 @@
opts.modules = parse_mk_file(opts.file, "modules", opts.modules)
opts.includes = parse_mk_file(opts.file, "incpath", opts.includes)
opts.defines = parse_mk_file(opts.file, "defines", opts.defines)
+ addlibs_list = parse_mk_file(opts.file, "addlibs", [])
arch = ''.join(parse_mk_file(opts.file, "CPU", ["dsPIC"]))
# TODO: perhaps we want to check that the modules list (etc) is not empty..
-# print "modules = ", opts.modules
-# print "defines = ", opts.defines
+ print "modules = ", opts.modules
+ print "defines = ", opts.defines
for mod in opts.modules:
mod_incs = parse_options_file(opts.root + "/" + mod
+ "/
module.mk", "local_inc").split(' ')
@@ -434,6 +441,7 @@
inc_list = [rootsep + str(x) for x in opts.includes]
includes = ';'.join(inc_list)
# opts.defines = ";".join(opts.defines)
+ addlibs = ';'.join(addlibs_list)
filters = ""
prjname =
opts.name + "-" + opts.target + "-" +
opts.config[0].replace("/", " ").split(" ")[-1]
@@ -453,10 +461,21 @@
includes = includes + "\t\t\t<Add directory=\"" + inc + "\" />\n"
emBlocks_project(arch,
opts.name, opts.target, opts.config, defines,
includes, headers, sources, project)
elif opts.target == "SIL":
- sources = vs2010_scan_dirs(["*.c"], 1, opts.modules)
+ sources = vs2010_scan_dirs(["*.c", "*.cpp"], 1, opts.modules)
+ headers = vs2010_scan_dirs(["*.h"], 0, opts.config + opts.modules +
["libUDB"])
+ vs2010_project(arch, opts.target, rootsep, opts.config, includes,
headers, sources, project, opts.defines, prjname, addlibs)
+ sources = vs2010_scan_filter_dirs(["*.c", "*.cpp"], 1,
opts.modules, "Source Files\\")
+ headers = vs2010_scan_filter_dirs(["*.h"], 0, opts.config + opts.modules
+ ["libUDB"], "Header Files\\")
+ filters = filters + vs2010_make_filter_dirs("Source", source_folders)
+ filters = filters + vs2010_make_filter_dirs("Header", header_folders)
+ vs2010_filters(arch, opts.target, rootsep, opts.config, filters,
headers, sources, project)
+ elif opts.target == "JSB":
+ sources = vs2010_scan_dirs(["*.c", "*.cpp"], 1, opts.modules)
+ print "opts.config", opts.config
+ print "opts.modules", opts.modules
headers = vs2010_scan_dirs(["*.h"], 0, opts.config + opts.modules +
["libUDB"])
- vs2010_project(arch, opts.target, rootsep, opts.config, includes,
headers, sources, project, opts.defines, prjname)
- sources = vs2010_scan_filter_dirs(["*.c"], 1, opts.modules, "Source
Files\\")
+ vs2010_project(arch, opts.target, rootsep, opts.config, includes,
headers, sources, project, opts.defines, prjname, addlibs)
+ sources = vs2010_scan_filter_dirs(["*.c", "*.cpp"], 1,
opts.modules, "Source Files\\")
headers = vs2010_scan_filter_dirs(["*.h"], 0, opts.config + opts.modules
+ ["libUDB"], "Header Files\\")
filters = filters + vs2010_make_filter_dirs("Source", source_folders)
filters = filters + vs2010_make_filter_dirs("Header", header_folders)
=======================================
--- /branches/MatrixPilot_beta/Tools/Build/template.vcxproj Sat May 16
13:15:19 2015 UTC
+++ /branches/MatrixPilot_beta/Tools/Build/template.vcxproj Tue Jul 7
14:03:00 2015 UTC
@@ -12,7 +12,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{81C72BCE-FAF2-423A-B311-50BA1F7A010D}</ProjectGuid>
- <RootNamespace>XP-netdata</RootNamespace>
+ <RootNamespace>$(ProjectName)</RootNamespace>
<Keyword>Win32Proj</Keyword>
<ProjectName>%%PROJECT%%</ProjectName>
</PropertyGroup>
@@ -62,19 +62,19 @@
<ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName>
</ClCompile>
<Link>
-
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+
<AdditionalDependencies>ws2_32.lib;%%LINK_LIBS%%;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>.\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)XP-netdata.pdb</ProgramDatabaseFile>
+
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
- <ImportLibrary>$(OutDir)XP-netdata.lib</ImportLibrary>
+ <ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -89,7 +89,7 @@
<ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName>
</ClCompile>
<Link>
- <OutputFile>$(OutDir)XP-netdata.dll</OutputFile>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
@@ -97,16 +97,14 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
- <ImportLibrary>$(OutDir)XP-netdata.lib</ImportLibrary>
+ <ImportLibrary>$(OutDir)$(ProjectName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
-%%SOURCE_FILES%%
- </ItemGroup>
+%%SOURCE_FILES%% </ItemGroup>
<ItemGroup>
-%%HEADER_FILES%%
- </ItemGroup>
+%%HEADER_FILES%% </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
=======================================
--- /branches/MatrixPilot_beta/Tools/Build/template.vcxproj.filters Sun Feb
22 12:45:47 2015 UTC
+++ /branches/MatrixPilot_beta/Tools/Build/template.vcxproj.filters Tue
Jul 7 14:03:00 2015 UTC
@@ -15,12 +15,9 @@
<Filter Include="Header Files\Tools">
<UniqueIdentifier>{4858c16f-d050-4b6e-be04-517fe6b65d70}</UniqueIdentifier>
</Filter>
-%%FILTERS%%
- </ItemGroup>
+%%FILTERS%% </ItemGroup>
<ItemGroup>
-%%SOURCE_FILES%%
- </ItemGroup>
+%%SOURCE_FILES%% </ItemGroup>
<ItemGroup>
-%%HEADER_FILES%%
- </ItemGroup>
+%%HEADER_FILES%% </ItemGroup>
</Project>
=======================================
--- /branches/MatrixPilot_beta/Tools/MatrixPilot-SIL/
module.mk Sun Feb 22
12:45:47 2015 UTC
+++ /branches/MatrixPilot_beta/Tools/MatrixPilot-SIL/
module.mk Tue Jul 7
14:03:00 2015 UTC
@@ -2,9 +2,4 @@
local_src := $(wildcard $(SOURCE_DIR)/$(subdirectory)/*.c)
-ifneq (,$(filter $(TOOLCHAIN), C30 XC16))
-local_src += $(wildcard $(SOURCE_DIR)/$(subdirectory)/*.s)
-else
-endif
-
$(eval $(call make-target,$(subdirectory)/$(subdirectory).a,$(local_src)))
=======================================
--- /branches/MatrixPilot_beta/makefile Mon May 25 21:52:05 2015 UTC
+++ /branches/MatrixPilot_beta/makefile Tue Jul 7 14:03:00 2015 UTC
@@ -104,7 +104,7 @@
$(foreach l,$(subst /, ,$(subst $(ROOT_DIR),,$(CURDIR))),$(eval $(call
source-path-rel-dir,$l)))
SOURCE_DIR ?= $(subst $(space),/,$(TMP_SRC_DIR))
#$(warning SOURCE_DIR: $(SOURCE_DIR))
-MKFILES_DIR = $(SOURCE_DIR)
+MKFILES_DIR = $(SOURCE_DIR)/Tools/makefiles
################################################################################
# Collect information from each module in the following variables.