Commit 406c3b56 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Dependancy fixes and cflag optimization

parent 1b4b001c
...@@ -9,6 +9,8 @@ VPATH= /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib ...@@ -9,6 +9,8 @@ VPATH= /lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib
LIBTOOL=libtool LIBTOOL=libtool
OS= $(shell uname -s) OS= $(shell uname -s)
HW= $(shell uname -m)
ifneq ($(OS), FreeBSD) ifneq ($(OS), FreeBSD)
FLEX=flex FLEX=flex
else else
...@@ -19,6 +21,7 @@ ifdef HOST ...@@ -19,6 +21,7 @@ ifdef HOST
CC=${HOST}-gcc CC=${HOST}-gcc
LIBTOOL=${HOST}-libtool LIBTOOL=${HOST}-libtool
CONF_HOST=--host=${HOST} CONF_HOST=--host=${HOST}
HW=$(HOST)
endif endif
......
BLOCK_TARGETS += $(LIBDIR)/libblock.la BLOCK_TARGETS := $(LIBDIR)/libblock.la
$(eval $(call SUBDIR,il2c)) $(eval $(call SUBDIR,il2c))
BLOCK_SRCS = \ BLOCK_SRCS := \
$(DIR)/block_add.c \ $(DIR)/block_add.c \
$(DIR)/block_and2.il \ $(DIR)/block_and2.il \
$(DIR)/block_bridge_pwm.c \ $(DIR)/block_bridge_pwm.c \
...@@ -47,7 +47,6 @@ BLOCK_SRCS = \ ...@@ -47,7 +47,6 @@ BLOCK_SRCS = \
$(DIR)/block_value_bool.c \ $(DIR)/block_value_bool.c \
$(DIR)/block_value_uint32.c $(DIR)/block_value_uint32.c
OS= $(shell uname -s)
ifneq ($(OS), FreeBSD) ifneq ($(OS), FreeBSD)
BLOCK_SRCS+= \ BLOCK_SRCS+= \
$(DIR)/block_joystick.c $(DIR)/block_joystick.c
...@@ -57,7 +56,7 @@ BLOCK_OBJSC := $(BLOCK_SRCS:.c=.lo) ...@@ -57,7 +56,7 @@ BLOCK_OBJSC := $(BLOCK_SRCS:.c=.lo)
BLOCK_OBJS := $(BLOCK_OBJSC:.il=.il2c.lo) BLOCK_OBJS := $(BLOCK_OBJSC:.il=.il2c.lo)
$(BLOCK_OBJS): CFLAGS += -O0 -g -Wall $(BLOCK_OBJS): CFLAGS += -O3 -Wall
$(LIBDIR)/libblock.la_LDFLAGS += -lm $(LIBDIR)/libblock.la_LDFLAGS += -lm
$(LIBDIR)/libblock.la: $(BLOCK_OBJS) $(LIBDIR)/libblock.la: $(BLOCK_OBJS)
$(LIB_LINK) $(LIB_LINK)
......
...@@ -14,21 +14,18 @@ DT_CTRL_TARGETS += $(DIR)/dt_ctrl ...@@ -14,21 +14,18 @@ DT_CTRL_TARGETS += $(DIR)/dt_ctrl
DT_CTRL_SRCS := $(DIR)/dt_ctrl.c DT_CTRL_SRCS := $(DIR)/dt_ctrl.c
DT_CTRL_OBJS := $(DT_CTRL_SRCS:.c=.o) DT_CTRL_OBJS := $(DT_CTRL_SRCS:.c=.o)
BLOCKS := `$(DIR)/controller/block_list.sh $(DIR)/lib/*.a` BLOCKS := $(shell $(DIR)/controller/block_list.sh $(DIR)/lib/*.a)
BLOCKDEP := $(shell $(DIR)/controller/block_dep.sh $(DIR)/lib/*.a)
$(DIR)/dt_ctrl: \ $(DIR)/dt_ctrl: \
libcontroller.la \ libcontroller.la \
libblock.la \
libethercat.la \
liblog.la \ liblog.la \
libshell.la \ libshell.la \
libdt_azimuth.la \ $(BLOCKDEP)
libdt_elevation.la
$(DIR)/dt_ctrl: CFLAGS += -Wall -O3 $(DIR)/dt_ctrl: CFLAGS += -Wall -O3
$(DIR)/dt_ctrl: LDFLAGS += \ $(DIR)/dt_ctrl: LDFLAGS += \
-Wl,-E \ -Wl,-E \
-lcontroller \ -lcontroller \
-lblock \
-lethercat \ -lethercat \
-llog \ -llog \
-lshell \ -lshell \
......
#!/bin/sh
for lib in $@; do
SYMBOLS=`nm $lib |grep "block_.*_create" |cut -d' ' -f3`
if [ "${SYMBOLS}none" != "none" ]; then
echo -n "$lib "
fi
done
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