Makefile 2.08 KB
#!/sbin/smake
#
# Makefile for PR/diags/rdp
#
# rdpide may be built locally here, for testing with just the local modules;
# a master ide will be built the next directory level up, and will link with
# all the test modules.
#
#

PRDEPTH = ../..

include $(PRDEPTH)/PRdefs

IDEAWKSCRIPT=$(PRDEPTH)/diags/ide/builtins.awk

LIBDG= $(ROOT)/usr/lib/PR/libdg.a
LIBIDE= $(PRDEPTH)/diags/ide/libide.a

ARCHIVE = archive/test001_ms_io_0.cov.rcp1.archive	\
          archive/test031_att_io_0.cov.rcp1.archive	\
          archive/test001_ms_io_0.rgb.rcp1.archive	\
          archive/test031_att_io_0.rgb.rcp1.archive  \
          archive/test001_ms_io_0.z.rcp1.archive	\
	  archive/test031_att_io_0.z.rcp1.archive	\
	  archive/test001_ms_io_0.cov.rcp2.archive	\
          archive/test031_att_io_0.cov.rcp2.archive	\
          archive/test001_ms_io_0.rgb.rcp2.archive	\
          archive/test031_att_io_0.rgb.rcp2.archive  \
          archive/test001_ms_io_0.z.rcp2.archive	\
	  archive/test031_att_io_0.z.rcp2.archive

INDATA =  InData/test001_ms.rdram.Z	\
	  InData/test031_att.rdram.Z

#LCOPTS=	-g -DNO_MEM_UTILS
LCOPTS=	-g
STDINC=	$(ROOT)/usr/include
IDEINC=	$(ROOT)/usr/include/ide
PRINC=	$(PRDEPTH)/include

LCINCS=	-I$(PRINC) -I$(STDINC) -I$(IDEINC)

LLDOPTS = -L -L$(ROOT)/usr/lib/PR -L$(PRDEPTH)/diags/ide
LLDLIBS = -ldg -lide

OBJS=	rdpcmd.o \
	rdp.o \
	rdp_dl.o \
	rdpstubs.o

COMMONOBJS= ../common/reg.o

TARGETS= rdpide

default all: $(TARGETS)

install: default
	$(INSTALL) -m 777 -dir /usr/diags/bin/InData
	$(INSTALL) -m 777 -dir /usr/diags/bin/OutData
	$(INSTALL) -F /usr/diags/bin $(ARCHIVE) $(INDATA) OutData/README


rdpide: $(LIBDG) $(LIBIDE) $(OBJS) $(COMMONOBJS)
	$(CC) -o rdpide $(OBJS) $(COMMONOBJS) $(LDFLAGS)

clean:
	rm -f rdpcmd.c $(OBJS)

clobber: clean
	rm -f $(TARGETS) Makedepend

rdpcmd.c: rdpcmd.awk $(IDEAWKSCRIPT)
	nawk -F'\t[\t ]*' -f $(IDEAWKSCRIPT) rdpcmd.awk > $@

rdpcmd.o: rdpcmd.c $(IDEINC)/ide.h
	$(CC) $(CFLAGS) -c rdpcmd.c -o rdpcmd.o

rdp.o: rdp.c $(IDEINC)/diag.h $(IDEINC)/dbg_comm.h

rdp_dl.o: rdp_dl.c $(IDEINC)/diag.h $(IDEINC)/dbg_comm.h

.SUFFIXES: .o

.c.o:
	$(CC) $(CFLAGS) -c $< -o $*.o