Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
4b8f214d
Commit
4b8f214d
authored
Aug 21, 2014
by
Jeroen Vreeken
Browse files
move controller to new build
parent
56d8add4
Changes
119
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
4b8f214d
.PHONY
:
clean all rel_mktemp_dir console
controller
help
.PHONY
:
clean all rel_mktemp_dir console help
include
build.mk
include
build.mk
...
@@ -6,7 +6,6 @@ CONTROLLER_REL_TAR:=$(CURDIR)/controller_$(shell date +%Y%m%d%H%M).tar.gz
...
@@ -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
CONSOLE_REL_TAR
:=
$(CURDIR)
/console_
$(
shell
date
+%Y%m%d%H%M
)
.tar.gz
all
:
subdirs
all
:
subdirs
$(MAKE)
-C
controller
cd
libnova-0.13.0
;
./configure
-enable-static
-disable-shared
--prefix
=
${CURDIR}
;
make
;
make
install
cd
libnova-0.13.0
;
./configure
-enable-static
-disable-shared
--prefix
=
${CURDIR}
;
make
;
make
install
$(MAKE)
-C
console
$(MAKE)
-C
console
...
@@ -33,7 +32,6 @@ help:
...
@@ -33,7 +32,6 @@ help:
controller
:
subdirs
controller
:
subdirs
$(MAKE)
-C
controller
console
:
subdirs
console
:
subdirs
cd
libnova-0.13.0
;
./configure
-enable-static
-disable-shared
--prefix
=
${CURDIR}
;
make
;
make
install
cd
libnova-0.13.0
;
./configure
-enable-static
-disable-shared
--prefix
=
${CURDIR}
;
make
;
make
install
...
@@ -41,7 +39,6 @@ console: subdirs
...
@@ -41,7 +39,6 @@ console: subdirs
clean
:
subdirs_CLEAN
clean
:
subdirs_CLEAN
rm
-rf
common/lib/
*
rm
-rf
common/lib/
*
$(MAKE)
-C
controller clean
cd
libnova-0.13.0
;
make clean
||
true
cd
libnova-0.13.0
;
make clean
||
true
$(MAKE)
-C
console clean
$(MAKE)
-C
console clean
...
@@ -125,17 +122,21 @@ DIR := $(DIR)
...
@@ -125,17 +122,21 @@ DIR := $(DIR)
endef
endef
$(eval
$(call
SUBDIR,common))
$(eval
$(call
SUBDIR,common))
$(eval
$(call
SUBDIR,controller))
CFLAGS
:=
-Icommon
-Icommon
/include
-Icontroller
CFLAGS
:=
-Icommon
-Icommon
/include
LDFLAGS
:=
-Lcommon
/lib
-Lcontroller
/lib
LDFLAGS
:=
-Lcommon
/lib
VPATH
+=
common/lib controller/lib
VPATH
+=
common/lib
subdirs
:
$(TARGETS)
subdirs
:
$(TARGETS)
SRCS_TMP
=
$(SRCS:.il=.il.d)
SRCS_TMP
=
$(SRCS:.il=.il.d)
-include
$(SRCS_TMP:.c=.d) $(patsubst %.c,.libs/%.d,$(SRCS_TMP))
-include
$(SRCS_TMP:.c=.d) $(patsubst %.c,.libs/%.d,$(SRCS_TMP))
SRCS_IL
=
$(
filter
%.il,
$(SRCS)
)
$(SRCS_IL)
:
$(IL2C)
subdirs_CLEAN
:
subdirs_CLEAN
:
rm
-rf
$(CLEAN)
rm
-rf
$(CLEAN)
build.mk
View file @
4b8f214d
...
@@ -41,7 +41,7 @@ endif
...
@@ -41,7 +41,7 @@ endif
define
LIB_LINK
define
LIB_LINK
@echo
"LT LD $@"
@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 $@"
@echo
"LT INST $@"
@${LIBTOOL}
--quiet
--mode
=
install install
$@
$(
abspath
$
(
@D
))
@${LIBTOOL}
--quiet
--mode
=
install install
$@
$(
abspath
$
(
@D
))
endef
endef
...
@@ -52,11 +52,10 @@ endef
...
@@ -52,11 +52,10 @@ endef
%.tab.c %.tab.h
:
%.y
%.tab.c %.tab.h
:
%.y
@
echo
"BISON
$<
"
@
echo
"BISON
$<
"
@
bison
-
d
$<
@
bison
-
-defines
=
$*
.tab.h
$<
-o
$*
.tab.c
%.yy.c %.yy.h
:
%.l %.tab.h
%.yy.c %.yy.h
:
%.l %.tab.h
@
echo
" FLEX
$<
"
@
echo
" FLEX
$<
"
@
echo
$(FLEX)
--header-file
=
$*
.yy.h
-o
$*
.yy.c
$<
@
$(FLEX)
--header-file
=
$*
.yy.h
-o
$*
.yy.c
$<
@
$(FLEX)
--header-file
=
$*
.yy.h
-o
$*
.yy.c
$<
# il2c: instruction list 2 c 'compiler'
# il2c: instruction list 2 c 'compiler'
...
...
common/build.mk
View file @
4b8f214d
LIBDIR
:=
$(DIR)
/lib
LIBDIR
:=
$(DIR)
/lib
ABSLIBDIR
:=
$(
abspath
$(LIBDIR)
)
$(eval
$(call
SUBDIR,log))
$(eval
$(call
SUBDIR,log))
$(eval
$(call
SUBDIR,utils))
$(eval
$(call
SUBDIR,utils))
...
...
common/command/build.mk
View file @
4b8f214d
...
@@ -10,7 +10,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
...
@@ -10,7 +10,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
$(LIBDIR)/libcommand.la
:
libutils.la liblog.la
$(LIBDIR)/libcommand.la
:
libutils.la liblog.la
$(LIBDIR)/libcommand.la
:
CFLAGS += -Wall -O3 -fPIC
$(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)
$(LIBDIR)/libcommand.la
:
$(ARCHOBJS)
$(LIB_LINK)
$(LIB_LINK)
...
...
common/log/build.mk
View file @
4b8f214d
...
@@ -7,7 +7,7 @@ SRCS+=$(ARCHSRCS)
...
@@ -7,7 +7,7 @@ SRCS+=$(ARCHSRCS)
TARGETS
+=
$(LIBDIR)
/liblog.la
TARGETS
+=
$(LIBDIR)
/liblog.la
$(LIBDIR)/liblog.la
:
libutils.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
:
CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/liblog.la
:
$(ARCHOBJS)
$(LIBDIR)/liblog.la
:
$(ARCHOBJS)
$(LIB_LINK)
$(LIB_LINK)
...
...
common/trace/build.mk
View file @
4b8f214d
...
@@ -12,7 +12,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
...
@@ -12,7 +12,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
$(LIBDIR)/libtrace.la
:
libutils.la liblog.la
$(LIBDIR)/libtrace.la
:
libutils.la liblog.la
$(LIBDIR)/libtrace.la
:
CFLAGS += -Wall -O3 -fPIC
$(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)
$(LIBDIR)/libtrace.la
:
$(ARCHOBJS)
$(LIB_LINK)
$(LIB_LINK)
...
...
common/utils/build.mk
View file @
4b8f214d
...
@@ -22,7 +22,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
...
@@ -22,7 +22,7 @@ ARCHOBJS := $(ARCHSRCS:.c=.lo)
LU_CFLAGS
:=
-Wall
-g
-fPIC
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_CFLAGS
+=
`
pkg-config
--cflags
glib-2.0
`
LU_LDFLAGS
+=
`
pkg-config
--libs
glib-2.0
`
LU_LDFLAGS
+=
`
pkg-config
--libs
glib-2.0
`
...
...
controller/Makefile
View file @
4b8f214d
...
@@ -17,9 +17,6 @@ LDFLAGS+= -ldl
...
@@ -17,9 +17,6 @@ LDFLAGS+= -ldl
endif
endif
dt_ctrl_LDFLAGS
=
`
./controller/block_list.sh lib/
*
.a
`
\
-lcontroller
-lblock
-lethercat
-llog
-lshell
\
-ldt_azimuth
-ldt_elevation
all
:
dt_ctrl
\
all
:
dt_ctrl
\
test
\
test
\
...
...
controller/block/Makefile
deleted
100644 → 0
View file @
56d8add4
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
controller/block/block_add.c
View file @
4b8f214d
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
#include "block_add.h"
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_bridge_pwm.c
View file @
4b8f214d
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_counter.c
View file @
4b8f214d
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_debug.c
View file @
4b8f214d
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
/*
/*
inputs
inputs
...
...
controller/block/block_decoder_uint32_bool.c
View file @
4b8f214d
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_filter_iir.c
View file @
4b8f214d
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
#include
"
block_filter_iir.h
"
#include
<block/
block_filter_iir.h
>
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_filter_iir.h
View file @
4b8f214d
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_IIR_
#ifndef _INCLUDE_BLOCK_IIR_
#define _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
);
struct
controller_block
*
block_filter_iir_create
(
char
*
name
);
...
...
controller/block/block_filter_lp.c
View file @
4b8f214d
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
#include "block_filter_lp.h"
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_friction.c
View file @
4b8f214d
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include <string.h>
#include <string.h>
#include <math.h>
#include <math.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_gain.c
View file @
4b8f214d
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
/*
/*
inputs outputs
inputs outputs
...
...
controller/block/block_gain.h
View file @
4b8f214d
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#ifndef _INCLUDE_BLOCK_GAIN_
#ifndef _INCLUDE_BLOCK_GAIN_
#define _INCLUDE_BLOCK_GAIN_
#define _INCLUDE_BLOCK_GAIN_
#include
"
controller_block.h
"
#include
<controller/
controller_block.h
>
struct
controller_block
*
block_gain_create
(
char
*
name
);
struct
controller_block
*
block_gain_create
(
char
*
name
);
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment