1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/native/Makefile
2014-02-14 14:30:16 +01:00

26 lines
702 B
Makefile

MODULE = cpu
EXCLUDES := -I$(RIOTBASE)/sys/posix/%
DIRS =
ifneq (,$(filter rtc,$(USEMODULE)))
DIRS += rtc
endif
ifneq (,$(filter nativenet,$(USEMODULE)))
DIRS += net
endif
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
include $(RIOTBASE)/Makefile.base
$(BINDIR)%.o: %.c
$(AD)$(CC) $(CFLAGS) $(filter-out $(EXCLUDES),$(INCLUDES)) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -c $*.c -o $(BINDIR)$*.o
@$(CC) $(CFLAGS) $(INCLUDES) $(BOARDINCLUDE) $(PROJECTINCLUDE) $(CPUINCLUDE) -MM $*.c > $(BINDIR)$*.d
@printf "$(BINDIR)" | cat - $(BINDIR)$*.d > /tmp/riot_out && mv /tmp/riot_out $(BINDIR)$*.d
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;