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
LIBTOOL=libtool
OS= $(shell uname -s)
HW= $(shell uname -m)
ifneq ($(OS), FreeBSD)
FLEX=flex
else
......@@ -19,6 +21,7 @@ ifdef HOST
CC=${HOST}-gcc
LIBTOOL=${HOST}-libtool
CONF_HOST=--host=${HOST}
HW=$(HOST)
endif
......
BLOCK_TARGETS += $(LIBDIR)/libblock.la
BLOCK_TARGETS := $(LIBDIR)/libblock.la
$(eval $(call SUBDIR,il2c))
BLOCK_SRCS = \
BLOCK_SRCS := \
$(DIR)/block_add.c \
$(DIR)/block_and2.il \
$(DIR)/block_bridge_pwm.c \
......@@ -47,7 +47,6 @@ BLOCK_SRCS = \
$(DIR)/block_value_bool.c \
$(DIR)/block_value_uint32.c
OS= $(shell uname -s)
ifneq ($(OS), FreeBSD)
BLOCK_SRCS+= \
$(DIR)/block_joystick.c
......@@ -57,7 +56,7 @@ BLOCK_OBJSC := $(BLOCK_SRCS:.c=.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: $(BLOCK_OBJS)
$(LIB_LINK)
......
......@@ -14,21 +14,18 @@ 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`
BLOCKS := $(shell $(DIR)/controller/block_list.sh $(DIR)/lib/*.a)
BLOCKDEP := $(shell $(DIR)/controller/block_dep.sh $(DIR)/lib/*.a)
$(DIR)/dt_ctrl: \
libcontroller.la \
libblock.la \
libethercat.la \
liblog.la \
libshell.la \
libdt_azimuth.la \
libdt_elevation.la
$(BLOCKDEP)
$(DIR)/dt_ctrl: CFLAGS += -Wall -O3
$(DIR)/dt_ctrl: LDFLAGS += \
-Wl,-E \
-lcontroller \
-lblock \
-lethercat \
-llog \
-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