Makefile 1.25 KB
#!smake
#
# $Revision: 1.1.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/PR
LCOPTS	= -fullwarn -g -DDEBUG
LCFLAGS = $(LCOPTS) $(LCINCS)

#
# 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)
		$(CCF) -o $@ randmain.o randtest.o sync.o $(LLDLIBS)

$(IOSIMBIN):	sim.h simipc.h iotest.h iomap.h main.o syncstub.o $(IOSIMLIB)
		$(CCF) -o $@ main.o syncstub.o $(LLDLIBS)

$(IOSIMUTIL):	sim.h simipc.h iotest.h iomap.h tst2c.o syncstub.o $(IOSIMLIB)
		$(CCF) -o $@ tst2c.o syncstub.o $(LLDLIBS)

tstsim:		sim.h iotest.h iomap.h tstsim.o test.o $(IOSIMLIB)
		$(CCF) -o $@ tstsim.o test.o $(LLDLIBS)

.c.o:
	$(HOST_CC) $(LCFLAGS) -c $<