Commit 4b8f214d authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

move controller to new build

parent 56d8add4
......@@ -25,9 +25,9 @@
%{
#include <stdio.h>
#include <inttypes.h>
#include "controller_load_parser.tab.h"
#include "controller_load_int.h"
#include "log.h"
#include <controller/controller_load_parser.tab.h>
#include <controller/controller_load_int.h>
#include <log/log.h>
#undef YY_INPUT
#define YY_INPUT(buf,readbytes,sizebytes) controller_load_yy_input(buf,&readbytes,sizebytes, yyscanner)
......
......@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_load.h"
#include <controller/controller_load.h>
enum variable_type {
VARIABLE_STRING,
......
......@@ -31,10 +31,10 @@
#include <errno.h>
#include <signal.h>
#include "controller_block.h"
#include "controller_sample.h"
#include "log.h"
#include "shell.h"
#include <controller/controller_block.h>
#include <controller/controller_sample.h>
#include <log/log.h>
#include <shell/shell.h>
static int nsec_interval;
......
......@@ -35,7 +35,7 @@
#include <controller/controller_block.h>
#include <controller/controller_trace.h>
#include <controller/controller_sample.h>
#include "log.h"
#include <log/log.h>
#include <trace/trace.h>
static int nr_traces = 0;
......
CFLAGS= -Wall -O3 -I../controller -I../ec -I../../common/log -I../utils
ARCHSRCS= dt_az_safety.c dt_az_stoeber_sim.c
ARCHOBJS=$(ARCHSRCS:.c=.lo)
all: libdt_azimuth.la_install
libdt_azimuth.la_LDFLAGS=-rpath ${CURDIR}/../lib -lcontroller -L../lib
libdt_azimuth.la: $(ARCHOBJS)
libdt_azimuth.la_install: libdt_azimuth.la
@echo "CP $^ to libdir"
@${LIBTOOL} --quiet --mode=install install libdt_azimuth.la ${CURDIR}/../lib
clean:
rm -rf *.o *.a *.d *.lo *.la .libs
SRCS=$(ARCHSRCS)
include ../build.mk
DT_AZIMUTH_TARGETS += $(LIBDIR)/libdt_azimuth.la
DT_AZIMUTH_SRCS = \
$(DIR)/dt_az_safety.c \
$(DIR)/dt_az_stoeber_sim.c
DT_AZIMUTH_OBJS := $(DT_AZIMUTH_SRCS:.c=.lo)
$(LIBDIR)/libdt_azimuth.la: libcontroller.la liblog.la
$(LIBDIR)/libdt_azimuth.la: LDFLAGS += -lcontroller -llog
$(LIBDIR)/libdt_azimuth.la: CFLAGS += -O3 -Wall
$(LIBDIR)/libdt_azimuth.la: $(DT_AZIMUTH_OBJS)
$(LIB_LINK)
TARGETS += $(DT_AZIMUTH_TARGETS)
CLEAN += $(DT_AZIMUTH_TARGETS) $(DT_AZIMUTH_OBJS)
SRCS += $(DT_AZIMUTH_SRCS)
......@@ -21,9 +21,9 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "dt_az_safety.h"
#include "log.h"
#include <controller/controller_block.h>
#include <dt_azimuth/dt_az_safety.h>
#include <log/log.h>
/*
inputs outputs
......
......@@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_DT_AZ_SAFETY_
#define _INCLUDE_BLOCK_DT_AZ_SAFETY_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_dt_az_safety_create(char *name);
......
......@@ -21,7 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block_private {
bool *ba1;
......
......@@ -37,16 +37,16 @@
#include "dynarg.h"
#include "controller_block.h"
#include "controller_trace.h"
#include "controller_sample.h"
#include "controller_dumpdot.h"
#include "controller_load.h"
#include "shell.h"
#include "ec.h"
#include "log.h"
#include "dt_port_numbers.h"
#include <controller/controller_block.h>
#include <controller/controller_trace.h>
#include <controller/controller_sample.h>
#include <controller/controller_dumpdot.h>
#include <controller/controller_load.h>
#include <shell/shell.h>
#include <ec/ec.h>
#include <log/log.h>
#include <dt_port_numbers.h>
......
CFLAGS= -Wall -O3 -I../controller -I../ec -I../../common/log -I../utils
SRCS= dt_el_safety.c dt_el_stoeber_r_sim.c dt_el_stoeber_l_sim.c
ARCHOBJS=$(SRCS:.c=.lo)
all: libdt_elevation.la_install
libdt_elevation.la_LDFLAGS=-rpath ${CURDIR}/../lib -lcontroller -L../lib
libdt_elevation.la: $(ARCHOBJS)
libdt_elevation.la_install: libdt_elevation.la
@echo "CP $^ to libdir"
@${LIBTOOL} --quiet --mode=install install libdt_elevation.la ${CURDIR}/../lib
dt_elevation: dt_elevation.a($(OBJS))
clean:
rm -rf *.o *.a *.d *.lo .libs *la
include ../build.mk
DT_ELEVATION_TARGETS += $(LIBDIR)/libdt_elevation.la
DT_ELEVATION_SRCS = \
$(DIR)/dt_el_safety.c \
$(DIR)/dt_el_stoeber_r_sim.c \
$(DIR)/dt_el_stoeber_l_sim.c
DT_ELEVATION_OBJS := $(DT_ELEVATION_SRCS:.c=.lo)
$(LIBDIR)/libdt_elevation.la: libcontroller.la liblog.la
$(LIBDIR)/libdt_elevation.la: LDFLAGS += -lcontroller -llog
$(LIBDIR)/libdt_elevation.la: CFLAGS += -O3 -Wall
$(LIBDIR)/libdt_elevation.la: $(DT_ELEVATION_OBJS)
$(LIB_LINK)
TARGETS += $(DT_ELEVATION_TARGETS)
CLEAN += $(DT_ELEVATION_TARGETS) $(DT_ELEVATION_OBJS)
SRCS += $(DT_ELEVATION_SRCS)
......@@ -22,9 +22,9 @@
#include <string.h>
#include <math.h>
#include "controller_block.h"
#include "dt_el_safety.h"
#include "log.h"
#include <controller/controller_block.h>
#include <dt_elevation/dt_el_safety.h>
#include <log/log.h>
/*
inputs outputs
......
......@@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_DT_EL_SAFETY_
#define _INCLUDE_BLOCK_DT_EL_SAFETY_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_dt_el_safety_create(char *name);
......
......@@ -22,8 +22,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "controller_block.h"
#include "log.h"
#include <controller/controller_block.h>
#include <log/log.h>
struct controller_block_private {
bool *ba1;
......
......@@ -22,7 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block_private {
bool *ba1;
......
OS= $(shell uname -s)
CFLAGS= -Wall -O3 \
-I. -I.. -I../../common/log -I../controller
LDFLAGS= -lpthread -lrt -lm -L../lib -L../../common/lib
ifneq ($(OS), FreeBSD)
LDFLAGS+= -ldl
endif
LIBSRCS= ec.c \
esc.c esc_coe.c esc_esi.c esc_mailbox.c esc_device.c esc_watchdog.c \
esc_dc.c canopen.c ec_stoeber.c block_ec.c
ifeq ($(OS), FreeBSD)
LIBSRCS+= eth_bsd.c
else
LIBSRCS+= eth_linux.c
endif
LIBOBJS= $(LIBSRCS:.c=.lo)
BLOCKSRCS= \
block_beckhoff_el1xxx.c \
block_beckhoff_el2xxx.c \
block_beckhoff_el2502.c \
block_beckhoff_el3xxx.c \
block_beckhoff_el4xxx.c \
block_beckhoff_el5001.c \
block_beckhoff_el5101.c \
block_beckhoff_el7031.c \
block_stoeber.c
# block_beckhoff_ax5xxx.c \
BLOCKS=$(BLOCKSRCS:.c=.lo)
SRCS=$(BLOCKSRCS) $(LIBSRCS)
all: ec_test.o libethercat.la_install ec_enum
libethercat.la_LDFLAGS=-rpath ${CURDIR}/../lib -lcontroller
libethercat.la: $(LIBOBJS) $(BLOCKS)
libethercat.la_install: libethercat.la
@echo "CP $^ to libdir"
@${LIBTOOL} --quiet --mode=install install libethercat.la ${CURDIR}/../lib
ec_enum: libethercat.la_install
ec_enum_LDFLAGS=-lethercat
ifneq ($(OS), FreeBSD)
ec_enum_LDFLAGS+= -ldl
endif
ec_enum: ec_enum.o
ec_enum.o: esc_id.h
clean:
rm -rf *.o *.a *.la *.lo .libs *.d ec_enum
include ../build.mk
......@@ -23,12 +23,12 @@
#include <controller/controller_block.h>
#include "block_beckhoff_el1xxx.h"
#include "ec.h"
#include "esc.h"
#include "esc_esi.h"
#include "esc_id.h"
#include "log.h"
#include <ec/block_beckhoff_el1xxx.h>
#include <ec/ec.h>
#include <ec/esc.h>
#include <ec/esc_esi.h>
#include <ec/esc_id.h>
#include <log/log.h>
struct controller_block_private {
bool input1;
......
......@@ -23,12 +23,12 @@
#include <controller/controller_block.h>
#include "block_beckhoff_el2502.h"
#include "ec.h"
#include "esc.h"
#include "esc_esi.h"
#include "esc_coe.h"
#include "esc_id.h"
#include <ec/block_beckhoff_el2502.h>
#include <ec/ec.h>
#include <ec/esc.h>
#include <ec/esc_esi.h>
#include <ec/esc_coe.h>
#include <ec/esc_id.h>
#define EL2502_COE_RXPDO_ASSIGN 0x1c12
#define EL2502_COE_RXPDO_ASSIGN_O1_PWM 0x1600 /* only PWM */
......
......@@ -23,12 +23,12 @@
#include <controller/controller_block.h>
#include "block_beckhoff_el2xxx.h"
#include "ec.h"
#include "esc.h"
#include "esc_esi.h"
#include "esc_id.h"
#include "log.h"
#include <ec/block_beckhoff_el2xxx.h>
#include <ec/ec.h>
#include <ec/esc.h>
#include <ec/esc_esi.h>
#include <ec/esc_id.h>
#include <log/log.h>
struct controller_block_private {
bool *output1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment