Browse Source

move controller to new build

corso2014
Jeroen Vreeken 7 years ago
parent
commit
4b8f214d62
119 changed files with 594 additions and 669 deletions
  1. +9
    -8
      Makefile
  2. +2
    -3
      build.mk
  3. +0
    -1
      common/build.mk
  4. +1
    -1
      common/command/build.mk
  5. +1
    -1
      common/log/build.mk
  6. +1
    -1
      common/trace/build.mk
  7. +1
    -1
      common/utils/build.mk
  8. +0
    -3
      controller/Makefile
  9. +0
    -85
      controller/block/Makefile
  10. +2
    -2
      controller/block/block_add.c
  11. +1
    -1
      controller/block/block_bridge_pwm.c
  12. +1
    -1
      controller/block/block_counter.c
  13. +1
    -1
      controller/block/block_debug.c
  14. +1
    -1
      controller/block/block_decoder_uint32_bool.c
  15. +2
    -2
      controller/block/block_filter_iir.c
  16. +1
    -1
      controller/block/block_filter_iir.h
  17. +2
    -2
      controller/block/block_filter_lp.c
  18. +1
    -1
      controller/block/block_friction.c
  19. +1
    -1
      controller/block/block_gain.c
  20. +1
    -1
      controller/block/block_gain.h
  21. +1
    -1
      controller/block/block_gain_var.c
  22. +2
    -2
      controller/block/block_limit.c
  23. +2
    -2
      controller/block/block_limit_2nd.c
  24. +1
    -1
      controller/block/block_limit_2nd.h
  25. +1
    -1
      controller/block/block_limit_dyn.c
  26. +2
    -2
      controller/block/block_limit_var.c
  27. +2
    -2
      controller/block/block_matrix_2x2.c
  28. +1
    -1
      controller/block/block_matrix_2x2.h
  29. +1
    -1
      controller/block/block_multiplexer.c
  30. +2
    -2
      controller/block/block_pid.c
  31. +1
    -2
      controller/block/block_pid_aw.c
  32. +2
    -2
      controller/block/block_quadrature_decoder.c
  33. +1
    -1
      controller/block/block_quantize.c
  34. +1
    -1
      controller/block/block_random.c
  35. +1
    -1
      controller/block/block_random.h
  36. +1
    -1
      controller/block/block_rangecheck.c
  37. +3
    -3
      controller/block/block_servo_state.c
  38. +3
    -4
      controller/block/block_setpoint_generator.c
  39. +2
    -4
      controller/block/block_sine.c
  40. +1
    -1
      controller/block/block_subtract.c
  41. +1
    -3
      controller/block/block_switch.c
  42. +4
    -4
      controller/block/block_trajectplayer.c
  43. +1
    -1
      controller/block/block_trajectplayer.h
  44. +1
    -1
      controller/block/block_trigger.c
  45. +1
    -1
      controller/block/block_value.c
  46. +1
    -1
      controller/block/block_value_bool.c
  47. +1
    -1
      controller/block/block_value_uint32.c
  48. +66
    -0
      controller/block/build.mk
  49. +0
    -20
      controller/block/il2c/Makefile
  50. +28
    -0
      controller/block/il2c/build.mk
  51. +0
    -14
      controller/block/il2c/test/Makefile
  52. +20
    -0
      controller/block/il2c/test/build.mk
  53. +42
    -80
      controller/build.mk
  54. +0
    -40
      controller/controller/Makefile
  55. +32
    -0
      controller/controller/build.mk
  56. +3
    -3
      controller/controller/controller_block.c
  57. +3
    -3
      controller/controller/controller_block_param.c
  58. +2
    -2
      controller/controller/controller_block_trace.c
  59. +2
    -2
      controller/controller/controller_command.c
  60. +8
    -8
      controller/controller/controller_load.c
  61. +3
    -3
      controller/controller/controller_load_parser.l
  62. +1
    -1
      controller/controller/controller_load_variable.c
  63. +4
    -4
      controller/controller/controller_sample.c
  64. +1
    -1
      controller/controller/controller_trace.c
  65. +0
    -22
      controller/dt_azimuth/Makefile
  66. +21
    -0
      controller/dt_azimuth/build.mk
  67. +3
    -3
      controller/dt_azimuth/dt_az_safety.c
  68. +1
    -1
      controller/dt_azimuth/dt_az_safety.h
  69. +1
    -1
      controller/dt_azimuth/dt_az_stoeber_sim.c
  70. +10
    -10
      controller/dt_ctrl.c
  71. +0
    -24
      controller/dt_elevation/Makefile
  72. +22
    -0
      controller/dt_elevation/build.mk
  73. +3
    -3
      controller/dt_elevation/dt_el_safety.c
  74. +1
    -1
      controller/dt_elevation/dt_el_safety.h
  75. +2
    -2
      controller/dt_elevation/dt_el_stoeber_l_sim.c
  76. +1
    -1
      controller/dt_elevation/dt_el_stoeber_r_sim.c
  77. +0
    -63
      controller/ec/Makefile
  78. +6
    -6
      controller/ec/block_beckhoff_el1xxx.c
  79. +6
    -6
      controller/ec/block_beckhoff_el2502.c
  80. +6
    -6
      controller/ec/block_beckhoff_el2xxx.c
  81. +7
    -7
      controller/ec/block_beckhoff_el3xxx.c
  82. +7
    -7
      controller/ec/block_beckhoff_el4xxx.c
  83. +6
    -6
      controller/ec/block_beckhoff_el5001.c
  84. +7
    -7
      controller/ec/block_beckhoff_el5101.c
  85. +6
    -6
      controller/ec/block_beckhoff_el7031.c
  86. +3
    -3
      controller/ec/block_ec.c
  87. +4
    -4
      controller/ec/block_stoeber.c
  88. +55
    -0
      controller/ec/build.mk
  89. +2
    -2
      controller/ec/canopen.c
  90. +5
    -5
      controller/ec/ec.c
  91. +1
    -1
      controller/ec/ec.h
  92. +6
    -6
      controller/ec/ec_enum.c
  93. +3
    -3
      controller/ec/ec_int.h
  94. +7
    -7
      controller/ec/ec_stoeber.c
  95. +2
    -2
      controller/ec/ec_stoeber.h
  96. +4
    -4
      controller/ec/ec_test.c
  97. +5
    -5
      controller/ec/esc.c
  98. +2
    -2
      controller/ec/esc.h
  99. +3
    -3
      controller/ec/esc_coe.c
  100. +1
    -1
      controller/ec/esc_coe.h

+ 9
- 8
Makefile View File

@ -1,4 +1,4 @@
.PHONY: clean all rel_mktemp_dir console controller help
.PHONY: clean all rel_mktemp_dir console help
include build.mk
@ -6,7 +6,6 @@ CONTROLLER_REL_TAR:=$(CURDIR)/controller_$(shell date +%Y%m%d%H%M).tar.gz
CONSOLE_REL_TAR:=$(CURDIR)/console_$(shell date +%Y%m%d%H%M).tar.gz
all: subdirs
$(MAKE) -C controller
cd libnova-0.13.0 ; ./configure -enable-static -disable-shared --prefix=${CURDIR} ; make; make install
$(MAKE) -C console
@ -33,7 +32,6 @@ help:
controller: subdirs
$(MAKE) -C controller
console: subdirs
cd libnova-0.13.0 ; ./configure -enable-static -disable-shared --prefix=${CURDIR} ; make; make install
@ -41,7 +39,6 @@ console: subdirs
clean: subdirs_CLEAN
rm -rf common/lib/*
$(MAKE) -C controller clean
cd libnova-0.13.0 ; make clean || true
$(MAKE) -C console clean
@ -125,17 +122,21 @@ DIR := $(DIR)
endef
$(eval $(call SUBDIR,common))
$(eval $(call SUBDIR,controller))
CFLAGS := -Icommon -Icommon/include
LDFLAGS := -Lcommon/lib
VPATH += common/lib
CFLAGS := -Icommon -Icommon/include -Icontroller
LDFLAGS := -Lcommon/lib -Lcontroller/lib
VPATH += common/lib controller/lib
subdirs: $(TARGETS)
SRCS_TMP=$(SRCS:.il=.il.d)
-include $(SRCS_TMP:.c=.d) $(patsubst %.c,.libs/%.d,$(SRCS_TMP))
SRCS_IL = $(filter %.il,$(SRCS))
$(SRCS_IL): $(IL2C)
subdirs_CLEAN:
rm -rf $(CLEAN)

+ 2
- 3
build.mk View File

@ -41,7 +41,7 @@ endif
define LIB_LINK
@echo "LT LD $@"
@${LIBTOOL} --quiet --mode=link gcc $(filter %.lo,$^) -o $@ $(LDFLAGS) $($@_LDFLAGS) -static-libtool-libs
@${LIBTOOL} --quiet --mode=link gcc $(filter %.lo,$^) -o $@ $(LDFLAGS) $($@_LDFLAGS) -static-libtool-libs -rpath $(abspath $(@D))
@echo "LT INST $@"
@${LIBTOOL} --quiet --mode=install install $@ $(abspath $(@D))
endef
@ -52,11 +52,10 @@ endef
%.tab.c %.tab.h: %.y
@echo "BISON $<"
@bison -d $<
@bison --defines=$*.tab.h $< -o $*.tab.c
%.yy.c %.yy.h: %.l %.tab.h
@echo " FLEX $<"
@echo $(FLEX) --header-file=$*.yy.h -o $*.yy.c $<
@$(FLEX) --header-file=$*.yy.h -o $*.yy.c $<
# il2c: instruction list 2 c 'compiler'


+ 0
- 1
common/build.mk View File

@ -1,6 +1,5 @@
LIBDIR:=$(DIR)/lib
ABSLIBDIR:=$(abspath $(LIBDIR))
$(eval $(call SUBDIR,log))
$(eval $(call SUBDIR,utils))


+ 1
- 1
common/command/build.mk View File

@ -10,7 +10,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
$(LIBDIR)/libcommand.la: libutils.la liblog.la
$(LIBDIR)/libcommand.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/libcommand.la: LDFLAGS += -lutils -lm -llog -rpath $(ABSLIBDIR)
$(LIBDIR)/libcommand.la: LDFLAGS += -lutils -lm -llog
$(LIBDIR)/libcommand.la: $(ARCHOBJS)
$(LIB_LINK)


+ 1
- 1
common/log/build.mk View File

@ -7,7 +7,7 @@ SRCS+=$(ARCHSRCS)
TARGETS += $(LIBDIR)/liblog.la
$(LIBDIR)/liblog.la: libutils.la
$(LIBDIR)/liblog.la: LDFLAGS += -lutils -rpath $(ABSLIBDIR)
$(LIBDIR)/liblog.la: LDFLAGS += -lutils
$(LIBDIR)/liblog.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/liblog.la: $(ARCHOBJS)
$(LIB_LINK)


+ 1
- 1
common/trace/build.mk View File

@ -12,7 +12,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
$(LIBDIR)/libtrace.la: libutils.la liblog.la
$(LIBDIR)/libtrace.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/libtrace.la: LDFLAGS += -lutils -llog -lm -rpath $(ABSLIBDIR)
$(LIBDIR)/libtrace.la: LDFLAGS += -lutils -llog -lm
$(LIBDIR)/libtrace.la: $(ARCHOBJS)
$(LIB_LINK)


+ 1
- 1
common/utils/build.mk View File

@ -22,7 +22,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
LU_CFLAGS := -Wall -g -fPIC
LU_LDFLAGS := -lpthread -lrt -lm -rpath $(ABSLIBDIR)
LU_LDFLAGS := -lpthread -lrt -lm
LU_CFLAGS += `pkg-config --cflags glib-2.0`
LU_LDFLAGS += `pkg-config --libs glib-2.0`


+ 0
- 3
controller/Makefile View File

@ -17,9 +17,6 @@ LDFLAGS+= -ldl
endif
dt_ctrl_LDFLAGS=`./controller/block_list.sh lib/*.a` \
-lcontroller -lblock -lethercat -llog -lshell \
-ldt_azimuth -ldt_elevation
all: dt_ctrl \
test \


+ 0
- 85
controller/block/Makefile View File

@ -1,85 +0,0 @@
IL2C=il2c/il2c
CFLAGS= -O3 -Wall \
-I../controller/ \
-I../../common/log/ -I../shell/ \
-I.. \
-I../../common/include \
-I../../common
BLOCKSRCS= \
block_add.c \
block_and2.il \
block_bridge_pwm.c \
block_counter.c \
block_debug.c \
block_decoder_uint32_bool.c \
block_filter_iir.c \
block_filter_lp.c \
block_friction.c \
block_gain.c \
block_gain_var.c \
block_limit.c \
block_limit_dyn.c \
block_limit_2nd.c \
block_limit_var.c \
block_matrix_2x2.c \
block_multiplexer.c \
block_not.il \
block_or2.il \
block_or3.il \
block_or4.il \
block_pid.c \
block_pid_aw.c \
block_quadrature_decoder.c \
block_quantize.c \
block_random.c \
block_rangecheck.c \
block_register.il \
block_setpoint_generator.c \
block_setreset.il \
block_servo_state.c \
block_sine.c \
block_subtract.c \
block_switch.c \
block_trajectplayer.c \
block_trigger.c \
block_value.c \
block_value_bool.c \
block_value_uint32.c
OS= $(shell uname -s)
ifneq ($(OS), FreeBSD)
BLOCKSRCS+= \
block_joystick.c
endif
SRCS= $(BLOCKSRCS)
BLOCKSRCSC=$(BLOCKSRCS:.c=.lo)
BLOCKS=$(BLOCKSRCSC:.il=.il2c.lo)
all: il2cdir libblock.la_install
il2cdir:
@echo " SUBDIR: $@"
@$(MAKE) -C il2c
.PHONY: il2cdir
$(BLOCKSRCS): il2cdir
libblock.la_LDFLAGS=-rpath ${CURDIR}/../lib -lm
libblock.la: $(BLOCKS)
libblock.la_install: libblock.la
@echo "CP $^ to libdir"
@${LIBTOOL} --quiet --mode=install install libblock.la ${CURDIR}/../lib
clean:
rm -rf *.o *.a *.yy.* *.tab.* *.d *.lo *.la .libs
@$(MAKE) -C il2c clean
include ../build.mk

+ 2
- 2
controller/block/block_add.c View File

@ -21,8 +21,8 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "block_add.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_bridge_pwm.c View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_counter.c View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_debug.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs


+ 1
- 1
controller/block/block_decoder_uint32_bool.c View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 2
- 2
controller/block/block_filter_iir.c View File

@ -21,8 +21,8 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "block_filter_iir.h"
#include <controller/controller_block.h>
#include <block/block_filter_iir.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_filter_iir.h View File

@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_IIR_
#define _INCLUDE_BLOCK_IIR_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_filter_iir_create(char *name);


+ 2
- 2
controller/block/block_filter_lp.c View File

@ -21,8 +21,8 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "block_filter_lp.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_friction.c View File

@ -22,7 +22,7 @@
#include <string.h>
#include <math.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_gain.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_gain.h View File

@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_GAIN_
#define _INCLUDE_BLOCK_GAIN_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_gain_create(char *name);


+ 1
- 1
controller/block/block_gain_var.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 2
- 2
controller/block/block_limit.c View File

@ -21,8 +21,8 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "block_limit.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 2
- 2
controller/block/block_limit_2nd.c View File

@ -22,8 +22,8 @@
#include <string.h>
#include <math.h>
#include "controller_block.h"
#include "block_limit_2nd.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_limit_2nd.h View File

@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_LIMIT_2ND_
#define _INCLUDE_BLOCK_LIMIT_2ND_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_limit_2nd_create(char *name);


+ 1
- 1
controller/block/block_limit_dyn.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 2
- 2
controller/block/block_limit_var.c View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
#include "block_limit_var.h"
/*
inputs outputs


+ 2
- 2
controller/block/block_matrix_2x2.c View File

@ -22,8 +22,8 @@
#include <string.h>
#include <math.h>
#include "controller_block.h"
#include "block_matrix_2x2.h"
#include <controller/controller_block.h>
#include <block/block_matrix_2x2.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_matrix_2x2.h View File

@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_MATRIX_2X2_
#define _INCLUDE_BLOCK_MATRIX_2X2_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_matrix_2x2_create(char *name);


+ 1
- 1
controller/block/block_multiplexer.c View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 2
- 2
controller/block/block_pid.c View File

@ -21,8 +21,8 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "block_pid.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 2
controller/block/block_pid_aw.c View File

@ -21,8 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "block_pid_aw.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 2
- 2
controller/block/block_quadrature_decoder.c View File

@ -29,8 +29,8 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "log.h"
#include <controller/controller_block.h>
#include <log/log.h>
/*
quadrature_decoder


+ 1
- 1
controller/block/block_quantize.c View File

@ -22,7 +22,7 @@
#include <string.h>
#include <math.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_random.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
outputs


+ 1
- 1
controller/block/block_random.h View File

@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_RANDOM_
#define _INCLUDE_BLOCK_RANDOM_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_random_create(char *name);


+ 1
- 1
controller/block/block_rangecheck.c View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 3
- 3
controller/block/block_servo_state.c View File

@ -21,10 +21,10 @@
#include <stdlib.h>
#include <string.h>
#include "log.h"
#include <log/log.h>
#include "controller_block.h"
#include "controller_sample.h"
#include <controller/controller_block.h>
#include <controller/controller_sample.h>
/*
inputs outputs


+ 3
- 4
controller/block/block_setpoint_generator.c View File

@ -23,10 +23,9 @@
#include <math.h>
#include <float.h>
#include "controller_block.h"
#include "block_setpoint_generator.h"
#include "controller_command.h"
#include "log.h"
#include <controller/controller_block.h>
#include <controller/controller_command.h>
#include <log/log.h>
/*
inputs outputs


+ 2
- 4
controller/block/block_sine.c View File

@ -22,10 +22,8 @@
#include <string.h>
#include <math.h>
#include "controller_block.h"
#include "controller_sample.h"
#include "block_sine.h"
#include <controller/controller_block.h>
#include <controller/controller_sample.h>
/*
outputs


+ 1
- 1
controller/block/block_subtract.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 3
controller/block/block_switch.c View File

@ -21,9 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "block_switch.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 4
- 4
controller/block/block_trajectplayer.c View File

@ -21,10 +21,10 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "controller_sample.h"
#include "block_trajectplayer.h"
#include "log.h"
#include <controller/controller_block.h>
#include <controller/controller_sample.h>
#include <block/block_trajectplayer.h>
#include <log/log.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_trajectplayer.h View File

@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_TRAJECTPLAYER_
#define _INCLUDE_BLOCK_TRAJECTPLAYER_
#include "controller_block.h"
#include <controller/controller_block.h>
struct controller_block * block_trajectplayer_create(char *name);


+ 1
- 1
controller/block/block_trigger.c View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
inputs outputs


+ 1
- 1
controller/block/block_value.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
outputs


+ 1
- 1
controller/block/block_value_bool.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
outputs


+ 1
- 1
controller/block/block_value_uint32.c View File

@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include <controller/controller_block.h>
/*
outputs


+ 66
- 0
controller/block/build.mk View File

@ -0,0 +1,66 @@
BLOCK_TARGETS += $(LIBDIR)/libblock.la
$(eval $(call SUBDIR,il2c))
BLOCK_SRCS = \
$(DIR)/block_add.c \
$(DIR)/block_and2.il \
$(DIR)/block_bridge_pwm.c \
$(DIR)/block_counter.c \
$(DIR)/block_debug.c \
$(DIR)/block_decoder_uint32_bool.c \
$(DIR)/block_filter_iir.c \
$(DIR)/block_filter_lp.c \
$(DIR)/block_friction.c \
$(DIR)/block_gain.c \
$(DIR)/block_gain_var.c \
$(DIR)/block_limit.c \
$(DIR)/block_limit_dyn.c \
$(DIR)/block_limit_2nd.c \
$(DIR)/block_limit_var.c \
$(DIR)/block_matrix_2x2.c \
$(DIR)/block_multiplexer.c \
$(DIR)/block_not.il \
$(DIR)/block_or2.il \
$(DIR)/block_or3.il \
$(DIR)/block_or4.il \
$(DIR)/block_pid.c \
$(DIR)/block_pid_aw.c \
$(DIR)/block_quadrature_decoder.c \
$(DIR)/block_quantize.c \
$(DIR)/block_random.c \
$(DIR)/block_rangecheck.c \
$(DIR)/block_register.il \
$(DIR)/block_setpoint_generator.c \
$(DIR)/block_setreset.il \
$(DIR)/block_servo_state.c \
$(DIR)/block_sine.c \
$(DIR)/block_subtract.c \
$(DIR)/block_switch.c \
$(DIR)/block_trajectplayer.c \
$(DIR)/block_trigger.c \
$(DIR)/block_value.c \
$(DIR)/block_value_bool.c \
$(DIR)/block_value_uint32.c
OS= $(shell uname -s)
ifneq ($(OS), FreeBSD)
BLOCK_SRCS+= \
$(DIR)/block_joystick.c
endif
BLOCK_OBJSC := $(BLOCK_SRCS:.c=.lo)
BLOCK_OBJS := $(BLOCK_OBJSC:.il=.il2c.lo)
$(LIBDIR)/libblock.la: LDFLAGS += -lm
$(LIBDIR)/libblock.la: CFLAGS += -O3 -Wall
$(LIBDIR)/libblock.la: $(BLOCK_OBJS)
$(LIB_LINK)
TARGETS += $(BLOCK_TARGETS)
CLEAN += $(BLOCK_TARGETS) $(BLOCK_OBJS)
SRCS += $(BLOCK_SRCS)

+ 0
- 20
controller/block/il2c/Makefile View File

@ -1,20 +0,0 @@
CFLAGS+= -O3 -Wall
all: il2c test
il2c: il.tab.o il.yy.o il2c.o
il2c.o: il.tab.h
test: il2c
@echo " SUBDIR: $@"
@$(MAKE) -C test
SRCS= il2c.c
clean:
rm -f il2c *.o *.tab.c *.tab.h *.yy.c *.d *.lo
@$(MAKE) -C test clean
include ../../build.mk

+ 28
- 0
controller/block/il2c/build.mk View File

@ -0,0 +1,28 @@
IL2C:=$(DIR)/il2c
$(eval $(call SUBDIR,test))
IL2C_TARGETS += $(DIR)/il2c
#$(eval $(call SUBDIR,test))
IL2C_SRCS = \
$(DIR)/il.tab.c \
$(DIR)/il.yy.c \
$(DIR)/il2c.c
$(DIR)/il2c.c: $(DIR)/il.tab.h
IL2C_OBJS := $(IL2C_SRCS:.c=.o)
$(DIR)/il2c: CFLAGS += -O3 -Wall
$(DIR)/il2c: $(IL2C_OBJS)
TARGETS += $(IL2C_TARGETS)
CLEAN += $(IL2C_TARGETS) $(IL2C_OBJS)
SRCS += $(IL2C_SRCS)

+ 0
- 14
controller/block/il2c/test/Makefile View File

@ -1,14 +0,0 @@
IL2C=../il2c
CFLAGS=-I ../../../
all: blocks
blocks: noil.o test.o oneshot.o
clean:
rm -rf *.o *.lo *.d *.h
include ../../../build.mk

+ 20
- 0
controller/block/il2c/test/build.mk View File

@ -0,0 +1,20 @@
TEST_TARGETS := $(DIR)/blocks
BLOCKS_SRCS = \
$(DIR)/noil.c \
$(DIR)/test.il \
$(DIR)/oneshot.il
BLOCKS_OBJSC := $(BLOCKS_SRCS:.c=.o)
BLOCKS_OBJS := $(BLOCKS_OBJSC:.il=.il2c.o)
$(DIR)/blocks: CFLAGS += -g -O0
$(DIR)/blocks: $(BLOCKS_OBJS)
TARGETS += $(TEST_TARGETS)
CLEAN += $(TEST_TARGETS) $(BLOCKS_OBJS)
SRCS += $(BLOCKS_SRCS)

+ 42
- 80
controller/build.mk View File

@ -1,80 +1,42 @@
# Some make rules to make output pretty....
# default ARFLAGS also has 'v', but we don't want it to be verbose.
ARFLAGS= -r
# make sure libs from /usr/local/lib are found
VPATH= /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib
LIBTOOL=libtool
OS= $(shell uname -s)
ifneq ($(OS), FreeBSD)
FLEX=flex
else
FLEX=/usr/local/bin/flex
endif
%.o : %.c
@echo "LT CC $<"
@${LIBTOOL} --quiet --mode=compile --tag=CC $(CC) -MMD $(CFLAGS) -c $<
%.o : %.il2c.c
@echo "LT CCil $<"
@${LIBTOOL} --quiet --mode=compile --tag=CC $(CC) -MMD $(CFLAGS) -c $<
@sed -e "s:\.il2c.c:\.il:" -i -i $*.il2c.d
# @echo " CC $<"
# @$(CC) -MMD $(CFLAGS) -c $<
%: %.o
@echo " LD $@"
@${LIBTOOL} --quiet --mode=link --tag=CC $(LINK.o) $(filter %.o,$^) $(LOADLIBS) $(LDLIBS) $($@_LDFLAGS) -o $@
%.lo: %.c
@echo "LT CC $<"
@${LIBTOOL} --quiet --mode=compile --tag=CC $(CC) -MMD $(CFLAGS) -c $<
# compatibility hack: Linux's sed doesn't have a separate argument to '-i',
# while on FreeBSD, '-i' takes a non-optional extension argument. With
# '-i -i' we'll specify '-i' twice on Linux and let FreeBSD use '[filename]-i'
# as intermediate file for in-place editing.
@sed -e "s:\.libs/::" -e "s:\.o:\.lo:" -i -i .libs/$*.d
%.lo: %.il2c.c
@echo "LT CCil $<"
@${LIBTOOL} --quiet --mode=compile --tag=CC $(CC) -MMD $(CFLAGS) -c $<
# compatibility hack: Linux's sed doesn't have a separate argument to '-i',
# while on FreeBSD, '-i' takes a non-optional extension argument. With
# '-i -i' we'll specify '-i' twice on Linux and let FreeBSD use '[filename]-i'
# as intermediate file for in-place editing.
@sed -e "s:\.libs/::" -e "s:\.o:\.lo:" -e "s:\.il2c.c:\.il:" -i -i .libs/$*.il2c.d
%.la:
@echo "LIBTOOL $@"
@${LIBTOOL} --quiet --mode=link gcc $^ -o $@ $(LDFLAGS) $($@_LDFLAGS) -static-libtool-libs
(%): %
@echo " AR $^ in $@"
@$(AR) $(ARFLAGS) $@ $^
%.tab.c %.tab.h: %.y
@echo " BISON $<"
@bison -d $<
%.yy.c %.yy.h: %.l %.tab.h
@echo " FLEX $<"
@echo $(FLEX) --header-file=$*.yy.h -o $*.yy.c $<
@$(FLEX) --header-file=$*.yy.h -o $*.yy.c $<
# il2c: instruction list 2 c 'compiler'
%.il2c.c: %.il
@echo " IL2C $<"
@$(IL2C) $<
# dot -> pdf
%.pdf: %.dot
@echo " DOT $<"
@dot $< -o $@ -Tpdf
SRCS_TMP=$(SRCS:.il=.il.d)
-include $(SRCS_TMP:.c=.d) $(patsubst %.c,.libs/%.d,$(SRCS_TMP))
LIBDIR:=$(DIR)/lib
$(eval $(call SUBDIR,controller))
$(eval $(call SUBDIR,shell))
$(eval $(call SUBDIR,block))
$(eval $(call SUBDIR,ec))
$(eval $(call SUBDIR,dt_azimuth))
$(eval $(call SUBDIR,dt_elevation))
$(eval $(call SUBDIR,test))
DT_CTRL_TARGETS += $(DIR)/dt_ctrl
DT_CTRL_SRCS := $(DIR)/dt_ctrl.c
DT_CTRL_OBJS := $(DT_CTRL_SRCS:.c=.o)
BLOCKS := `$(DIR)/controller/block_list.sh $(DIR)/lib/*.a`
$(DIR)/dt_ctrl: \
libcontroller.la \
libblock.la \
libethercat.la \
liblog.la \
libshell.la \
libdt_azimuth.la \
libdt_elevation.la
$(DIR)/dt_ctrl: CFLAGS += -Wall -O3
$(DIR)/dt_ctrl: LDFLAGS += \
-Wl,-E \
-lcontroller \
-lblock \
-lethercat \
-llog \
-lshell \
-ldt_azimuth \
-ldt_elevation \
$(BLOCKS)
$(DIR)/dt_ctrl: $(DT_CTRL_OBJS)
SRCS += $(DT_CTRL_SRCS)
TARGETS += $(DT_CTRL_TARGETS)
CLEAN += $(DT_CTRL_TARGETS) $(DT_CTRL_OBJS)

+ 0
- 40
controller/controller/Makefile View File

@ -1,40 +0,0 @@
CFLAGS= -O3 -Wall -I../../common/log/ -I../shell/ -I.. -I../../common/ -I../../common/include
CONTROLLERSRCS= \
controller_block.c \
controller_block_param.c \
controller_block_trace.c \
controller_command.c \
controller_trace.c \
controller_sample.c \
controller_dumpdot.c \
controller_load.c \
controller_load_variable.c \
controller_load_parser.tab.c \
controller_load_parser.yy.c
SRCS= $(CONTROLLERSRCS)
CONTROLLER= $(CONTROLLERSRCS:.c=.lo)
all: libcontroller.la_install
controller_load_parser.tab.lo: controller_load_parser.yy.c
controller_load.lo: controller_load_parser.tab.h controller_load_parser.yy.h
libcontroller.la_LDFLAGS=-rpath ${CURDIR}/../lib -lshell -ldl -lpthread -lrt -lcommand -ltrace -L../../common/lib
libcontroller.la: $(CONTROLLER)
libcontroller.la_install: libcontroller.la
@echo "CP $^ to libdir"
@${LIBTOOL} --quiet --mode=install install libcontroller.la ${CURDIR}/../lib
clean:
rm -rf *.o *.a *.yy.* *.tab.* *.d *.lo *.la .libs
include ../build.mk

+ 32
- 0
controller/controller/build.mk View File

@ -0,0 +1,32 @@
CONTROLLER_TARGETS += $(LIBDIR)/libcontroller.la
CONTROLLER_SRCS= \
$(DIR)/controller_block.c \
$(DIR)/controller_block_param.c \
$(DIR)/controller_block_trace.c \
$(DIR)/controller_command.c \
$(DIR)/controller_trace.c \
$(DIR)/controller_sample.c \
$(DIR)/controller_dumpdot.c \
$(DIR)/controller_load.c \
$(DIR)/controller_load_variable.c \
$(DIR)/controller_load_parser.tab.c \
$(DIR)/controller_load_parser.yy.c
CONTROLLER_OBJS := $(CONTROLLER_SRCS:.c=.lo)
$(LIBDIR)/libcontroller.la: libshell.la libcommand.la libtrace.la
$(LIBDIR)/libcontroller.la: LDFLAGS += -lshell -ldl -lpthread -lrt -lcommand -ltrace
$(LIBDIR)/libcontroller.la: CFLAGS += -O3 -Wall
$(LIBDIR)/libcontroller.la: $(CONTROLLER_OBJS)
$(LIB_LINK)
$(DIR)/controller_load_parser.tab.lo: $(DIR)/controller_load_parser.yy.c
$(DIR)/controller_load.lo: $(DIR)/controller_load_parser.tab.h
$(DIR)/controller_load.lo: $(DIR)/controller_load_parser.yy.h
TARGETS += $(CONTROLLER_TARGETS)
CLEAN += $(CONTROLLER_TARGETS) $(CONTROLLER_OBJS)
SRCS += $(CONTROLLER_SRCS)

+ 3
- 3
controller/controller/controller_block.c View File

@ -24,9 +24,9 @@
#include <pthread.h>
#include <dlfcn.h>
#include "controller_block.h"
#include "controller_sample.h"
#include "log.h"
#include <controller/controller_block.h>
#include <controller/controller_sample.h>
#include <log/log.h>
int nr_blocks = 0;
static struct controller_block **blocks = NULL;


+ 3
- 3
controller/controller/controller_block_param.c View File

@ -27,9 +27,9 @@
#include <string.h>
#include <stdlib.h>
#include "controller_block.h"
#include "controller_sample.h"
#include "log.h"
#include <controller/controller_block.h>
#include <controller/controller_sample.h>
#include <log/log.h>
static pthread_mutex_t param_lock;
static sem_t param_sync_sem;


+ 2
- 2
controller/controller/controller_block_trace.c View File

@ -25,8 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include "controller_block.h"
#include "log.h"
#include <controller/controller_block.h>
#include <log/log.h>
static int nr_traces = 0;
static struct controller_trace **traces;


+ 2
- 2
controller/controller/controller_command.c View File

@ -31,8 +31,8 @@
#include <errno.h>
#include <limits.h>
#include "log.h"
#include "dt_port_numbers.h"
#include <log/log.h>
#include <dt_port_numbers.h>
#include <controller/controller_command.h>
#include <controller/controller_sample.h>


+ 8
- 8
controller/controller/controller_load.c View File

@ -21,15 +21,15 @@
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "controller_load_parser.tab.h"
#include "controller_load_parser.yy.h"
#include "controller_load.h"
#include "controller_load_int.h"
#include "controller_sample.h"
#include "controller_block.h"
#include "../../common/include/dynarg.h"
#include <controller/controller_load_parser.tab.h>
#include <controller/controller_load_parser.yy.h>
#include <controller/controller_load.h>
#include <controller/controller_load_int.h>
#include <controller/controller_sample.h>
#include <controller/controller_block.h>
#include <dynarg.h>
#include <shell/shell.h>
#include "log.h"
#include <log/log.h>
struct controller_load_array {
void *array;


+ 3
- 3
controller/controller/controller_load_parser.l View File

@ -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)


+ 1
- 1
controller/controller/controller_load_variable.c View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
#include "controller_load.h"
#include <controller/controller_load.h>
enum variable_type {
VARIABLE_STRING,


+ 4
- 4
controller/controller/controller_sample.c View File

@ -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;


+ 1
- 1
controller/controller/controller_trace.c View File

@ -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;


+ 0
- 22
controller/dt_azimuth/Makefile View File

@ -1,22 +0,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

+ 21
- 0
controller/dt_azimuth/build.mk View File

@ -0,0 +1,21 @@
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)

+ 3
- 3
controller/dt_azimuth/dt_az_safety.c View File

@ -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


+ 1
- 1
controller/dt_azimuth/dt_az_safety.h View File

@ -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);


+ 1
- 1
controller/dt_azimuth/dt_az_stoeber_sim.c View File

@ -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;


+ 10
- 10
controller/dt_ctrl.c View File

@ -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>


+ 0
- 24
controller/dt_elevation/Makefile View File

@ -1,24 +0,0 @@
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

+ 22
- 0
controller/dt_elevation/build.mk View File

@ -0,0 +1,22 @@
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)

+ 3
- 3
controller/dt_elevation/dt_el_safety.c View File

@ -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


+ 1
- 1
controller/dt_elevation/dt_el_safety.h View File

@ -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);


+ 2
- 2
controller/dt_elevation/dt_el_stoeber_l_sim.c View File

@ -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;


+ 1
- 1
controller/dt_elevation/dt_el_stoeber_r_sim.c View File

@ -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;


+ 0
- 63
controller/ec/Makefile View File

@ -1,63 +0,0 @@
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