Makefile 1.11 KB
#!/sbin/smake
#
# Makefile for PR/diags/ndev
#
# ndevide 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

LCOPTS=	
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../ide
LLDLIBS = -ldg -lide

OBJS=	ndevcmd.o	\
	ndev_memtest.o	\
	ndev_bcopy.o	\
	ndev_bzero.o	\
	ndevstubs.o

TARGETS= ndevide

default install all: $(TARGETS)

ndevide: $(LIBDG) $(OBJS)
	$(CC) -o ndevide $(OBJS) $(LDFLAGS)

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

clobber: clean
	rm -f $(TARGETS) Makedepend

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

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

ndev_memtest.o: ndev_memtest.c $(IDEINC)/diag.h

.SUFFIXES: .o

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