source: branches/reconfiguration/modules/dspin_router/caba/test/simple_segment_recovery_test/Makefile @ 1016

Last change on this file since 1016 was 1016, checked in by cfuguet, 9 years ago

reconf: dspin_router

  • improve the code readability of the dspin_router model.
  • update the unitary tests of the dspin_router to support the local gateway hardware barrier, and the memory cache scratchpad mode.
File size: 2.4 KB
Line 
1# =============================================================================
2# \file      Makefile
3# \author    Cesar Fuguet
4# \date      July 9, 2014
5# =============================================================================
6include ../common.mk
7
8# =============================================================================
9# Include files paths
10# =============================================================================
11
12CONFDIR ?= output
13CONF    := $(addprefix $(CONFDIR)/config/, hard_config.h)
14
15INCLUDE += -I$(CONFDIR)/config
16
17# =============================================================================
18# Utils library
19# =============================================================================
20
21LIB_SRCS   := stdio.c \
22              string.c \
23              tty.c \
24              simhelper.c \
25                          xcu.c
26
27LIB_OBJS   := $(addprefix $(BUILD_DIR)/,\
28                  $(subst .c,.o, $(notdir $(LIB_SRCS))))
29
30LIB_TARGET := $(BUILD_DIR)/libutils.a
31
32# =============================================================================
33# Object files
34# =============================================================================
35
36S_SRCS := reset.S
37C_SRCS := main.c
38
39OBJS   := $(addprefix $(BUILD_DIR)/,\
40              $(subst .c,.o, $(notdir $(C_SRCS))) \
41              $(subst .S,.o, $(notdir $(S_SRCS))))
42
43TARGET := $(BUILD_DIR)/soft.elf
44
45# =============================================================================
46# Test variables
47# =============================================================================
48PLATFORM  := ../../../../../platforms/tsar_generic_iob
49SIMULATOR := $(PLATFORM)/simul.x
50
51# =============================================================================
52# Makefile rules
53# =============================================================================
54
55all: $(TARGET)
56
57# Specific dependencies
58# NOTE: normal prerequisites | order-only prerequisites
59# SEE: http://www.gnu.org/software/make/manual/make.html#Prerequisite-Types
60
61$(LIB_OBJS): $(CONF) | $(BUILD_DIR)
62$(OBJS): $(CONF) | $(BUILD_DIR)
63
64$(LIB_TARGET): $(LIB_OBJS)
65        $(AR) rcs $@ $(LIB_OBJS)
66
67$(TARGET): $(OBJS) ../soft.ld $(LIB_TARGET)
68        $(LD) -o $@ -T ../soft.ld $(OBJS) -L$(BUILD_DIR) -lutils
69        $(DU) -D $@ > $@.txt
70
71mkconfig $(SIMULATOR) $(CONF): $(PLATFORM)/scripts/onerun.py
72        ./$< -o $(CONFDIR) -p $(PLATFORM) -x3 -y3 -n1 -f -c
73
74$(BUILD_DIR):
75        $(MKDIR) $@
76
77clean:
78        $(RM) $(BUILD_DIR)
79
80clean-log:
81        $(RM) $(CONFDIR)
82
83.PHONY: $(SIMULATOR) mkconfig
84
85distclean: clean clean-log
Note: See TracBrowser for help on using the repository browser.