657b966fdc653ac8a0d454ed4313acdd790ad629
[akaros.git] / user / roslib / ivy / Makefrag
1 NATIVECC := ivycc
2
3 USER_ROSLIB_IVY_DIR := $(USER_ROSLIB_DIR)/ivy
4 OBJDIRS += $(USER_ROSLIB_IVY_DIR)
5
6 USER_ROSLIB_IVY_CFLAGS   := $(USER_CFLAGS) -nostdinc \
7                             -I$(USER_ROSLIB_INCLUDE_DIR)
8
9 USER_ROSLIB_IVY_SRCFILES := $(USER_ROSLIB_IVY_DIR)/deputy.c
10
11 USER_ROSLIB_IVY_OBJFILES := $(patsubst $(USER_ROSLIB_IVY_DIR)/%.c, \
12                             $(OBJDIR)/$(USER_ROSLIB_DIR)/%.o, \
13                             $(USER_ROSLIB_IVY_SRCFILES))
14
15 $(OBJDIR)/$(USER_ROSLIB_DIR)/deputy.o: $(USER_ROSLIB_IVY_SRCFILES)
16         @echo + cc [ROSLIB IVY] $<
17         @mkdir -p $(@D)
18         $(V)$(NATIVECC) $(USER_ROSLIB_IVY_CFLAGS) -c -o $@ $<
19
20 $(OBJDIR)/$(USER_ROSLIB_DIR)/libivyroslib.a: $(USER_ROSLIB_IVY_OBJFILES)
21         @echo + ar [ROSLIB IVY] $@
22         $(V)$(AR) r $@ $(USER_ROSLIB_IVY_OBJFILES) 2>/dev/null