GNUmakefile
1.32 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
#!smake
#
# $Revision: 1.1 $
#
PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
IOSIMLIB = libiosim.a
IOSIMBIN = iosim
IORAND = iorand
IOSIMUTIL = tst2c
TARGETS = $(IOSIMLIB) $(IORAND) $(IOSIMBIN) $(IOSIMUTIL)
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
#
# C Flags
#
LCINCS = -I. -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR -D_LANGUAGE_C
#LCOPTS = -fullwarn -g -DDEBUG
LCOPTS = -g -DDEBUG
LCFLAGS = $(LCOPTS) $(LCINCS)
CC=$(HOST_CC)
#
# Linker Flags
#
LLDLIBS = $(IOSIMLIB) #-lelf -lgen
default: $(TARGETS)
include $(COMMONRULES)
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)
.c.o:
$(HOST_CC) $(LCFLAGS) -c $<