Makefile 1.22 KB
#!/sbin/smake
#
# Makefile for PR/diags/common
#
# commonide 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.
#
# $Revision: 1.1.1.1 $
#

PRDEPTH = ../..

include $(PRDEPTH)/PRdefs

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

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

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=	commoncmd.o	\
	examineMem.o	\
	rdpDump.o	\
	reg.o		\
	commonstubs.o

TARGETS= commonide

default install all: $(TARGETS)

commonide: $(LIBDG) $(LIBIDE) $(OBJS)
	$(CC) -o commonide $(OBJS) $(LDFLAGS)

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

clobber: clean
	rm -f $(TARGETS) Makedepend

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

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

reg.o: $(IDEINC)/diag.h $(IDEINC)/dbg_comm.h
examineMem.o: $(IDEINC)/diag.h

.SUFFIXES: .o

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