<airframe name="FuckYou_1">


  <makefile>

    HOST=auto1
    USER=root
    PAPARAZZI_INC = -I$(PAPARAZZI_HOME)/var/$(AIRCRAFT) \
                    -I$(PAPARAZZI_SRC)/sw/airborne      \
                    -I$(PAPARAZZI_SRC)/sw/include


    LIB_EIGEN_DIR = /opt/paparazzi/omap/overo-oe/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/eigen2
    LIB_EIGEN_CFLAGS =  -I$(LIB_EIGEN_DIR) -DEIGEN_DONT_VECTORIZE  -DEIGEN_DONT_ALIGN -DNDEBUG

    LIBEKNAV_SRCS = fms/libeknav/basic_ins_qkf.cpp           \
                    fms/libeknav/ins_qkf_predict.cpp         \
                    fms/libeknav/ins_qkf_observe_vector.cpp  \
                    fms/libeknav/ins_qkf_observe_gps_pvt.cpp \
                    fms/libeknav/ins_qkf_observe_gps_p.cpp
#    LIBEKNAV_CFLAGS = -DTIME_OPS
    LIBEKNAV_CFLAGS =

    # test 1: how do I build cpp for using libeigen ?
    test1.ARCHDIR = omap
    test1.CXXFLAGS += $(LIB_EIGEN_CFLAGS)
    test1.cpp_srcs  = fms/libeknav/test_libeknav_1.cpp

    # test 2: now build with libeknav
    test2.ARCHDIR = omap
    test2.CXXFLAGS += $(LIB_EIGEN_CFLAGS)
    test2.cpp_srcs  = fms/libeknav/test_libeknav_2.cpp
    test2.CXXFLAGS += $(LIBEKNAV_CFLAGS)
    test2.cpp_srcs += $(LIBEKNAV_SRCS)

    # test 3: now try to add Paparazzi's C
    test3.ARCHDIR = omap
    test3.CXXFLAGS += $(LIB_EIGEN_CFLAGS)
    test3.CXXFLAGS += $(PAPARAZZI_INC)
    test3.cpp_srcs  = fms/libeknav/test_libeknav_3.cpp
    test3.CXXFLAGS += $(LIBEKNAV_CFLAGS)
    test3.cpp_srcs += $(LIBEKNAV_SRCS)
    test3.LDFLAGS  += -levent -lm
    test3.CFLAGS   += -DFMS_PERIODIC_FREQ=512
    test3.srcs     += fms/fms_periodic.c
    test3.CXXFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageVIUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageVIDown
    test3.srcs     += fms/fms_spi_link.c

    # test 4: Flags like test3
    test4.ARCHDIR = omap
    test4.CXXFLAGS += $(LIB_EIGEN_CFLAGS)
    test4.CXXFLAGS += $(PAPARAZZI_INC)
    test4.cpp_srcs  = fms/libeknav/test_libeknav_4.cpp
    test4.CXXFLAGS += $(LIBEKNAV_CFLAGS)
    test4.cpp_srcs += $(LIBEKNAV_SRCS)
    test4.LDFLAGS  += -levent -lm
    test4.CFLAGS   += -DFMS_PERIODIC_FREQ=512
    test4.srcs     += fms/fms_periodic.c
    test4.CXXFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageVIUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageVIDown
    test4.srcs     += fms/fms_spi_link.c

    # libeknav_from_log: first, this here
    filter.ARCHDIR = omap
    filter.CXXFLAGS += $(LIB_EIGEN_CFLAGS)
    filter.CXXFLAGS += $(PAPARAZZI_INC)
    filter.cpp_srcs  = fms/libeknav/libeksubsystems/navigation/nav_from_log.cpp
    filter.CXXFLAGS += $(LIBEKNAV_CFLAGS)
    filter.cpp_srcs += $(LIBEKNAV_SRCS)
    filter.LDFLAGS  += -levent -lm
    filter.CXXFLAGS += -DOVERO_LINK_MSG_UP=AutopilotMessageVIUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageVIDown

    # test network based telemetry on overo (using udp_transport2/messages2)
    overo_test_telemetry2.ARCHDIR  = omap
    overo_test_telemetry2.CFLAGS  += $(PAPARAZZI_INC)
    overo_test_telemetry2.srcs     = fms/overo_test_telemetry2.c
    overo_test_telemetry2.CFLAGS  += -DDOWNLINK -DDOWNLINK_TRANSPORT=UdpTransport
    overo_test_telemetry2.srcs    += fms/udp_transport2.c subsystems/datalink/downlink.c
    overo_test_telemetry2.srcs    += fms/fms_network.c
    overo_test_telemetry2.LDFLAGS += -levent

  </makefile>


</airframe>


