Makefile
949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
PRDEPTH = ../../..
include $(PRDEPTH)/PRdefs
IOSIMLIB = ../libiosim.a
TARGETS = si_test si_testr
CFILES = si_test.c
#
# C Flags
#
LCINCS = -I. -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR
# possible -D defines: DEBUG, CHATTY
LCOPTS = -g -Wall -W -DDEBUG -DCHATTY
LCFLAGS = $(LCOPTS) $(LCINCS)
CC=$(HOST_CC)
#
# Linker Flags
#
LLDLIBS = $(IOSIMLIB)
SIMRUN = sim.ipc +vcs+lic+wait +cpu_mon +cbus_mon +io_mon
ifdef SIMIPC_OUT
SIMRUN += > $(SIMIPC_OUT)
endif
TESTRUN = si_test -q
ifdef SI_TEST_LOG
TESTRUN += -l $(SI_TEST_LOG)
endif
ifdef SI_TEST_OUT
TESTRUN += > $(SI_TEST_OUT)
endif
default: subdirs $(TARGETS)
subdirs:
# $(SUBDIRS_MAKERULE)
include $(COMMONRULES)
si_test: $(OBJECTS) $(IOSIMLIB)
$(CC) -o $@ $^ $(SUBDIR_OBJS) $(SUBDIR_LIBS) $(LLDLIBS)
si_testr: si_testr.o $(IOSIMLIB)
$(CC) -o $@ si_testr.o $(LLDLIBS)
run: default
cd $(BBROOT)/hw/chip/vsim; $(SIMRUN) &
$(TESTRUN)
.c.o:
$(CC) $(LCFLAGS) -c $<