Minor changes to some makefiles to make things work in the presence of a cross-compiler.
[akaros.git] / user / roslib / ivy / Makefrag
1 USER_ROSLIB_IVY_DIR := $(USER_ROSLIB_DIR)/ivy
2 OBJDIRS += $(USER_ROSLIB_IVY_DIR)
3
4 USER_ROSLIB_IVY_CFLAGS   := $(USER_CFLAGS) --nodeputy -nostdinc \
5                             -I$(USER_ROSLIB_INCLUDE_DIR)
6
7 USER_ROSLIB_IVY_SRCFILES := $(USER_ROSLIB_IVY_DIR)/deputy.c
8
9 USER_ROSLIB_IVY_OBJFILES := $(patsubst $(USER_ROSLIB_IVY_DIR)/%.c, \
10                             $(OBJDIR)/$(USER_ROSLIB_DIR)/%.o, \
11                             $(USER_ROSLIB_IVY_SRCFILES))
12
13 $(OBJDIR)/$(USER_ROSLIB_DIR)/deputy.o: $(USER_ROSLIB_IVY_SRCFILES)
14         @echo + cc [ROSLIB IVY] $<
15         @mkdir -p $(@D)
16         $(V)$(CC) $(USER_ROSLIB_IVY_CFLAGS) -c -o $@ $<
17
18 $(OBJDIR)/$(USER_ROSLIB_DIR)/libivyroslib.a: $(USER_ROSLIB_IVY_OBJFILES)
19         @echo + ar [ROSLIB IVY] $@
20         $(V)$(AR) r $@ $(USER_ROSLIB_IVY_OBJFILES) 2>/dev/null