mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 08:22:43 +08:00
Changed paparazzi and sw/simulator/launchsitl to be build from source files with are modified. This removes the need to have a paparazzi.osx which only has different paths to ocamlrun and ocaml
This commit is contained in:
@@ -60,14 +60,14 @@ XSENS_XML = $(CONF)/xsens_MTi-G.xml
|
||||
TOOLS=$(PAPARAZZI_SRC)/sw/tools
|
||||
HAVE_ARM_NONE_EABI_GCC := $(shell which arm-none-eabi-gcc)
|
||||
ifeq ($(strip $(HAVE_ARM_NONE_EABI_GCC)),)
|
||||
#ARMGCC=/opt/paparazzi/bin/arm-elf-gcc
|
||||
ARMGCC=/usr/bin/arm-elf-gcc
|
||||
ARMGCC=$(shell which arm-elf-gcc)
|
||||
else
|
||||
ARMGCC=$(HAVE_ARM_NONE_EABI_GCC)
|
||||
endif
|
||||
OCAML=$(shell which ocaml)
|
||||
OCAMLRUN=$(shell which ocamlrun)
|
||||
|
||||
|
||||
all: static conf
|
||||
all: commands static conf
|
||||
|
||||
static : lib center tools cockpit multimon tmtc logalizer lpc21iap sim_static static_h usb_lib
|
||||
|
||||
@@ -211,6 +211,7 @@ clean:
|
||||
rm -f $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(DL_PROTOCOL_H)
|
||||
find . -mindepth 2 -name Makefile -exec sh -c '$(MAKE) -C `dirname {}` $@' \;
|
||||
find . -name '*~' -exec rm -f {} \;
|
||||
rm -f paparazzi sw/simulator/launchsitl
|
||||
|
||||
cleanspaces:
|
||||
find ./sw/airborne -name '*.[ch]' -exec sed -i {} -e 's/[ \t]*$$//' \;
|
||||
@@ -232,3 +233,13 @@ test_all_example_airframes:
|
||||
$(MAKE) AIRCRAFT=HITL clean_ac ap
|
||||
$(MAKE) AIRCRAFT=DM clean_ac ap sim
|
||||
$(MAKE) AIRCRAFT=CSC clean_ac ap
|
||||
|
||||
commands: paparazzi sw/simulator/launchsitl
|
||||
|
||||
paparazzi:
|
||||
cat src/paparazzi | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||
chmod a+x $@
|
||||
|
||||
sw/simulator/launchsitl:
|
||||
cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||
chmod a+x $@
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/opt/local/bin/ocamlrun /opt/local/bin/ocaml
|
||||
#load "unix.cma";;
|
||||
let (//) = Filename.concat
|
||||
let dirname = Filename.dirname Sys.argv.(0)
|
||||
let dirname = if Filename.is_relative dirname && dirname <> Filename.current_dir_name then Sys.getcwd () // dirname else dirname
|
||||
let env =
|
||||
Array.map (fun var ->
|
||||
let value = try Sys.getenv var with _ -> dirname in
|
||||
let value = if value = "." then Sys.getcwd () else value in
|
||||
Printf.sprintf "%s=%s" var value)
|
||||
[|"PAPARAZZI_SRC"; "PAPARAZZI_HOME"|]
|
||||
let com = dirname // "sw/supervision/paparazzicenter";;
|
||||
Sys.argv.(0) <- com;;
|
||||
let env = Array.append env (Unix.environment ());;
|
||||
Unix.execve com Sys.argv env
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/ocamlrun /usr/bin/ocaml
|
||||
#!OCAMLRUN OCAML
|
||||
#load "unix.cma";;
|
||||
let (//) = Filename.concat
|
||||
let paparazzi_home =
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/ocamlrun /usr/bin/ocaml
|
||||
#!OCAMLRUN OCAML
|
||||
#load "unix.cma";;
|
||||
let (//) = Filename.concat
|
||||
let dirname = Filename.dirname Sys.argv.(0)
|
||||
Reference in New Issue
Block a user