1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-483: update Windows build system, provide install replacement

Since msysGit lacks the install command, simple cp -f replacement
is provided. Don't forget to copy it into the msysGit bin subdirectory.

Introduced CLEAN_BUILD=NO make option to test packaging w/o cleaning.
Recommended for test builds only, not for production run.

make -j works great after PyMite dependency fix by commit
0005729056
So comment is updated as well.
This commit is contained in:
Oleg Semyonov 2011-05-15 14:54:24 +03:00
parent bac95dae11
commit b33d093a7a
6 changed files with 38 additions and 11 deletions

View File

@ -37,17 +37,18 @@ locations (but any other locations are fine as well):
- QtSDK in C:\Qt\2010.05
- msysGit in %ProgramFiles%\Git
- Unicode NSIS in %ProgramFiles%\NSIS\Unicode
- OpenOCD in C:\OpenOCD\0.4.0\bin
Also it is assumed that you have the C:\Program Files\Git\cmd\ directory in
the PATH. Usually this is the case for msysGit installation if you have chosen
the 2nd option: put only git and gitk in the PATH (it is recommended option).
Now you need to copy two files to your msysGit installation folders.
Now you need to copy few files to your msysGit installation folders.
Assuming that you installed the msysGit into C:\Program Files\Git\,
you have to copy:
make\winx86\bin\make -> C:\Program Files\Git\bin\
make\winx86\cmd\sh.cmd -> C:\Program Files\Git\cmd\
make\winx86\bin\* -> C:\Program Files\Git\bin\
make\winx86\cmd\* -> C:\Program Files\Git\cmd\
If you have msysGit installed into another directory, you need to update paths
accordingly. Also if you have tools installed into different directories and

15
make/winx86/bin/install Normal file
View File

@ -0,0 +1,15 @@
#!/bin/sh
#
# simple install command replacement for Windows
#
# This file should be put into C:\Program Files\Git\bin\ subdirectory
# (or similar, depeding on where the msysGit package was installed)
# to provide a make command to unix-like build environment on Windows.
#
# See also:
# README.txt
# http://wiki.openpilot.org/display/Doc/GCS+Development+on+Windows
# http://wiki.openpilot.org/display/Doc/Firmware+Development+on+Windows
#
cp -f $*

View File

@ -1,6 +1,8 @@
#!/bin/sh
#
# This file is to be put into C:\Program Files\Git\bin\ subdirectory
# make command replacement for Windows
#
# This file should be put into C:\Program Files\Git\bin\ subdirectory
# (or similar, depeding on where the msysGit package was installed)
# to provide a make command to unix-like build environment on Windows.
#

View File

@ -1 +1,9 @@
#
# make command replacement to run from command prompt under bash
#
# This file should be put into C:\Program Files\Git\cmd\ subdirectory
# (or similar, depeding on where the msysGit package was installed)
# to provide a shell prompt in the unix-like build environment on Windows.
#
exec /bin/make $*

View File

@ -1,6 +1,6 @@
@echo off
rem
rem This file is to be put into C:\Program Files\Git\cmd\ subdirectory
rem This file should be put into C:\Program Files\Git\cmd\ subdirectory
rem (or similar, depeding on where the msysGit package was installed)
rem to provide a shell prompt in the unix-like build environment on Windows.
rem
@ -56,6 +56,7 @@ call :which QTSDK "C:\Qt\2010.05\qt\bin" qmake.exe
call :which CODESOURCERY "C:\CodeSourcery\bin" cs-make.exe
call :which PYTHON "C:\Python27" python.exe
call :which UNSIS "%ProgramFiles%\NSIS\Unicode" makensis.exe
call :which OPENOCDBIN "C:\OpenOCD\0.4.0\bin" openocd.exe
if "%NOT_FOUND%" == "" goto set_path

View File

@ -4,12 +4,8 @@
# Tried the best to support parallel (-j) builds. But since this Makefile
# uses other Makefiles to build few targets which in turn have similar
# dependencies on uavobjects and other generated files, it is difficult
# to support parallel builds perfectly.
#
# Looks like it works for -j8, but fails for -j (unlimited jobs).
# So probably not a bad idea is to build release in single thread.
#
#.NOTPARALLEL:
# to support parallel builds perfectly. But at least it was tested with
# -j (unlimited job number) on Windows and Linux.
# Locate the root of the tree
WHEREAMI := $(dir $(lastword $(MAKEFILE_LIST)))
@ -41,9 +37,11 @@ help:
@echo
@echo " [Release build and packaging]"
@echo " release - Build and package the OpenPilot release"
@echo " release_flight - Build and package the OpenPilot flight firmware"
@echo
@echo " Notes:"
@echo " - the build directory will be removed first on every run"
@echo " unless CLEAN_BUILD=NO is defined (recommended for testing only)"
@echo " - release packages will be placed in $(RELEASE_DIR)"
@echo
@ -52,7 +50,9 @@ uavobjects: all_clean
$(V1) $(MAKE) -C $(ROOT_DIR) $@
all_clean:
ifneq ($(CLEAN_BUILD), NO)
$(V1) $(MAKE) -C $(ROOT_DIR) $@
endif
# Install template:
# $1 = target