GNUmakefile
1.64 KB
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
72
#!smake
#
# $Revision: 1.14 $
#
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
COMMONPREF = iosim
SUBDIRS = mi_test pi_test jtag_test random si_test
IOSIMLIB = libiosim.a
IOSIMBIN = iosim
IORAND = iorand
IOSIMUTIL = tst2c
TARGETS = $(IOSIMLIB) $(IORAND) $(IOSIMBIN) $(IOSIMUTIL) subdirs
CFILES = \
address.c misc.c iomap.c socket.c iotest.c iotestcmd.c iomem.c \
iotestebus.c iotestri.c iotestpi.c iotestsi.c \
iotestai.c iotestsp.c iotestrdp.c iotestram.c bcp_util.c bcptestri.c \
bcp_si.c bcptestsi.c bcp_usb.c bcp_rand_tests.c nvram.c
#
# C Flags
#
LCINCS = -Wall -I. -I$(ROOT)/host_include -I$(ROOT)/usr/include/PR -D_LANGUAGE_C
LCOPTS = -g -DDEBUG -DBCP_IPC
LCFLAGS = $(LCOPTS) $(LCINCS)
CC=$(HOST_CC)
#
# Linker Flags
#
LLDLIBS = $(IOSIMLIB)
default: $(TARGETS)
include $(COMMONRULES)
$(COMMONTARGS): $(COMMONPREF)clean $(COMMONPREF)clobber $(COMMONPREF)rmtargets
$(SUBDIRS_MAKERULE)
install: default
$(INSTALL) -m 555 -F /usr/sbin $(IORAND) $(IOSIMBIN)
$(IOSIMLIB): sim.h simipc.h iotest.h iomap.h main.o $(OBJECTS)
$(AR) rc $@ $(OBJECTS)
$(IORAND): sim.h simipc.h iotest.h iomap.h randmain.o randtest.o sync.o $(IOSIMLIB)
$(CC) -o $@ randmain.o randtest.o sync.o $(LLDLIBS)
$(IOSIMBIN): sim.h simipc.h iotest.h iomap.h main.o syncstub.o $(IOSIMLIB)
$(CC) -o $@ main.o syncstub.o $(LLDLIBS)
$(IOSIMUTIL): sim.h simipc.h iotest.h iomap.h tst2c.o syncstub.o $(IOSIMLIB)
$(CC) -o $@ tst2c.o syncstub.o $(LLDLIBS)
tstsim: sim.h iotest.h iomap.h tstsim.o test.o $(IOSIMLIB)
$(CC) -o $@ tstsim.o test.o $(LLDLIBS)
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS): $(IOSIMLIB)
$(MAKE) -C $@
.c.o:
$(HOST_CC) $(LCFLAGS) -c $<