Skip to content
Snippets Groups Projects
Commit 97264633 authored by burneykb's avatar burneykb
Browse files

Groundstation side compiles. Still need Node file information for both sides though

parent 840826ab
No related branches found
No related tags found
No related merge requests found
Showing
with 33 additions and 29 deletions
File moved
File moved
File moved
The common files are:
- packet.h
- packet.c
- setcontrol.h
- setcontrol.c
- bitwise.h
- controller.h
File moved
File moved
File moved
File moved
......@@ -6,10 +6,15 @@ GXX=g++
CFLAGS= -Wall -pedantic -Wextra -Werror -std=gnu99 -g -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable
CXXFLAGS= -Wall -pedantic -Wextra -Werror -Wno-reorder -Wno-unused-variable -std=c++0x -g
INCLUDES = $(foreach dir, $(INCDIR), -I$(dir))
INCDIR=inc src/vrpn src/vrpn/quat src/vrpn/build $(BESRCDIR) $(CLISRCDIR) $(FESRCDIR)
INCDIR=inc src/vrpn src/vrpn/quat src/vrpn/build $(COMSRCDIR) $(BESRCDIR) $(CLISRCDIR) $(FESRCDIR)
LIBS= -lpthread -lbluetooth -lvrpn -lquat -Lsrc/vrpn/build -Lsrc/vrpn/build/quat
OBJDIR=obj
# Common Objects
COMSRCDIR=../common
COMSOURCES := $(wildcard $(COMSRCDIR)/*.c )
COMOBJECTS = $(COMSOURCES:$(COMSRCDIR)/%.c=$(OBJDIR)/%.o)
# Backend Specific Variables
BEBINARY=BackEnd
BESRCDIR=src/backend
......@@ -31,7 +36,7 @@ FECSOURCES := $(wildcard $(FESRCDIR)/*.c )
FECOBJECTS = $(FECSOURCES:$(FESRCDIR)/%.c=$(OBJDIR)/%.o)
OBJECTS= $(CLIOBJECTS) $(BECOBJECTS) $(BECPPOBJECTS) $(FECOBJECTS)
OBJECTS= $(COMOBJECTS) $(CLIOBJECTS) $(BECOBJECTS) $(BECPPOBJECTS) $(FECOBJECTS)
# Default target
all: logs objdir backend cli $(SYMLINKS)
......@@ -48,9 +53,12 @@ $(CLIOBJECTS) : $(OBJDIR)/%.o : $(CLISRCDIR)/%.c
$(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS)
backend: $(BECPPOBJECTS) $(BECOBJECTS)
backend: $(COMOBJECTS) $(BECPPOBJECTS) $(BECOBJECTS)
$(GXX) $(CXXFLAGS) $^ -o $(BEBINARY) $(INCLUDES) $(LIBS)
$(COMOBJECTS) : $(OBJDIR)/%.o : $(COMSRCDIR)/%.c
$(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS)
$(FECOBJECTS) : $(OBJDIR)/%.o : $(FESRCDIR)/%.c
$(GCC) $(CFLAGS) -c $^ -o $@ $(INCLUDES) $(LIBS)
......@@ -77,4 +85,4 @@ clean:
rm -rf $(OBJDIR)/ $(BEBINARY) $(CLIBINARY)
debug:
@echo $(OBJECTS)
@echo $(COMOBJECTS)
......@@ -30,17 +30,17 @@
//user created includes
#include "communication.h"
#include "commands.h"
#include "../../../common/commands.h"
#include "vrpn_tracker.hpp"
#include "type_def.h"
#include "packet.h"
#include "../../../common/packet.h"
#include "responseparam.h"
#include "update.h"
#include "config.h"
#include "cmHandler.h"
#include "getparam.h"
#include "setparam.h"
#include "bitwise.h"
#include "../../../common/bitwise.h"
#define QUAD_BT_ADDR "00:06:66:64:61:D6"
#define QUAD_BT_CHANNEL 0x01
......
#include "commands.h"
#include "../../../common/commands.h"
/* New stuff - this is nice and clean */
......
#ifndef _CMHANDLER_H
#define _CMHANDLER_H
#include "controller.h"
#include "../../../common/controller.h"
enum paramIndices {
PARAM_ROLL_P ,
......@@ -45,4 +45,4 @@ const char * cmToString(int msgType, const struct controller_message *cm);
struct controller_message * stringToCm(const char * string, struct controller_message *cm);
#endif /* _CMHANDLER_H */
\ No newline at end of file
#endif /* _CMHANDLER_H */
#include "communication.h"
#include "commands.h"
#include "../../../common/commands.h"
#include <string.h>
#include <ctype.h>
......
#include "getparam.h"
#include "commands.h"
#include "bitwise.h"
#include "../../../common/commands.h"
#include "../../../common/bitwise.h"
#include <sys/types.h>
......
#ifndef _getparam_h
#define _getparam_h
#include "packet.h"
#include "controller.h"
#include "../../../common/packet.h"
#include "../../../common/controller.h"
#include <sys/types.h>
......
#include "responseparam.h"
#include "commands.h"
#include "bitwise.h"
#include "../../../common/commands.h"
#include "../../../common/bitwise.h"
#include <sys/types.h>
......
#ifndef _responseparam_h
#define _responseparam_h
#include "packet.h"
#include "controller.h"
#include "../../../common/packet.h"
#include "../../../common/controller.h"
#include <sys/types.h>
......
#include "setparam.h"
#include "commands.h"
#include "bitwise.h"
#include "../../../common/commands.h"
#include "../../../common/bitwise.h"
#include <sys/types.h>
......
#ifndef _setparam_h
#define _setparam_h
#include "packet.h"
#include "controller.h"
#include "../../../common/packet.h"
#include "../../../common/controller.h"
#include <sys/types.h>
......
#include "update.h"
#include "commands.h"
#include "bitwise.h"
#include "../../../common/commands.h"
#include "../../../common/bitwise.h"
#include <sys/types.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment