Makefile 2.57 KB
#!/sbin/smake
#
# Makefile for PR/diags/vi
#
# viide 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=	vicmd.o \
	vi.o \
	vistubs.o

PATTERNS=	colorbar_w320h240s100d16.image \
		colorbar_w320h240s75d16.image \
		colorbar_w640h480s100d16.image \
		colorbar_w640h480s75d16.image \
		colorbar_w320h240s100d32.image \
		colorbar_w320h240s75d32.image \
		colorbar_w640h480s100d32.image \
		colorbar_w640h480s75d32.image



COMMONOBJS= ../common/reg.o

TARGETS= viide $(PATTERNS) pattern_generator

default all: $(TARGETS)

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

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

clobber: clean
	rm -f $(TARGETS) Makedepend *.image

install: default
	$(INSTALL) -m 444 -F /usr/diags/data $(PATTERNS)

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

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

vi.o: $(IDEINC)/diag.h $(IDEINC)/dbg_comm.h

pattern_generator.o:

colorbar_w320h240s100d16.image: pattern_generator
	pattern_generator -w 320 -h 240 -s 100 -d 16 -o colorbar_w320h240s100d16.image

colorbar_w320h240s75d16.image: pattern_generator
	pattern_generator -w 320 -h 240 -s 75  -d 16 -o colorbar_w320h240s75d16.image

colorbar_w640h480s100d16.image: pattern_generator
	pattern_generator -w 640 -h 480 -s 100 -d 16 -o colorbar_w640h480s100d16.image

colorbar_w640h480s75d16.image: pattern_generator
	pattern_generator -w 640 -h 480 -s 75  -d 16 -o colorbar_w640h480s75d16.image

colorbar_w320h240s100d32.image: pattern_generator
	pattern_generator -w 320 -h 240 -s 100 -d 32 -o colorbar_w320h240s100d32.image

colorbar_w320h240s75d32.image: pattern_generator
	pattern_generator -w 320 -h 240 -s 75  -d 32 -o colorbar_w320h240s75d32.image

colorbar_w640h480s100d32.image: pattern_generator
	pattern_generator -w 640 -h 480 -s 100 -d 32 -o colorbar_w640h480s100d32.image

colorbar_w640h480s75d32.image: pattern_generator
	pattern_generator -w 640 -h 480 -s 75  -d 32 -o colorbar_w640h480s75d32.image

.SUFFIXES: .o

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