mirror of
https://github.com/nasa/fpp.git
synced 2025-12-10 00:40:22 -06:00
47 lines
1.0 KiB
Bash
Executable File
47 lines
1.0 KiB
Bash
Executable File
#!/bin/sh -e
|
|
|
|
fpp_to_cpp=../../../../../../bin/fpp-to-cpp
|
|
fprime_gcc=../../../../../../scripts/fprime-gcc
|
|
|
|
echo ' removing old files'
|
|
./clean
|
|
|
|
dir=`cd ../..; echo $PWD`
|
|
|
|
tops="
|
|
<NoInstances>
|
|
<OneInstance>
|
|
<TwoInstances>
|
|
"
|
|
|
|
echo ' generating C++'
|
|
$fpp_to_cpp -p $dir -i ../../builtin.fpp ../../tlm_packets.fpp
|
|
for suffix in hpp cpp
|
|
do
|
|
top_acs=`echo $tops | sed -e "s;<;../../;g" -e "s;>;TopologyAc.ref.$suffix;g"`
|
|
for file in ../../*TlmPacketsAc.ref.$suffix $top_acs
|
|
do
|
|
base=`basename $file .ref.$suffix`
|
|
cp $file $base.$suffix
|
|
done
|
|
done
|
|
|
|
echo ' compiling C++'
|
|
top_cpps=`echo $tops | sed -e "s;<;;g" -e "s;>;TopologyAc.cpp;g"`
|
|
for file in *TlmPacketsAc.cpp $top_cpps
|
|
do
|
|
include_paths="
|
|
-I..
|
|
-I../../../fprime
|
|
-I../../../fprime/config
|
|
-I../../../fprime/Fw/Time
|
|
-I../../../fprime/Fw/Tlm
|
|
"
|
|
echo " compiling $file"
|
|
for variable_flags in '' '-DFW_DIRECT_PORT_CALLS'
|
|
do
|
|
echo " variable_flags=$variable_flags"
|
|
$fprime_gcc $variable_flags $include_paths -Wno-unused-parameter -c $file
|
|
done
|
|
done
|