Makefile 1.17 KB
#!smake -J 3
#
# 
#
# $Revision: 1.1.1.1 $
#

PRDEPTH = ../../../..
include $(PRDEPTH)/PRdefs

#
#  Tools
#

#
#  Directories
#
RDPSIMDEPTH 	= ../../..
SIMLIB		= $(RDPSIMDEPTH)/simlib
HDR    		= $(RDPSIMDEPTH)/hdr
INDATA 		= .

#
#  C Sources
#  For each of these .tab files there is a corresponding .c
#  file which prints tabular data on stdout.  Each .c file
#  can be compiled to an executable.
#
TAB_FILES 	= inp000.tab inp002.tab inp003.tab inp011.tab inp012.tab inp013.tab inp014.tab inp015.tab

#
#  Header file Directories
#
LCINCS 		= -I. \
	 	-I$(SIMLIB) \
	 	-I$(HDR) \
		-fullwarn

GCINCS 		=
#
#  Linker Directories and Options
# 
LLDOPTS 	= -L. -L$(SIMLIB)
GLDOPTS 	=
LLDLIBS 	= 
#LLDLIBS 	= -lsimlib -lgl -limage
LNFLAGS 	= $(CFLAGS) 
LDFLAGS 	= -lm

#
#  Default Targets
#
TARGETS 	= tab_files
LDIRT   	= *.log *~ $(TAB_FILES) inp[0-9][0-9][0-9]

default install: $(TARGETS)
	

#
#  SGI Common Rules
#
include $(COMMONRULES)

#
#  Create 'tab' files from 'C' files
#
tab_files: $(TAB_FILES)
	
#
#  Suffix Rules
#
.SUFFIXES : .c .v .tab

.c.tab:
	$(HOST_CC) $*.c $(LCINCS) $(LDFLAGS) -o $* $(LLDLIBS)
	$* > $*.tab

.v.tab:
	compile.vcs $*.v
	simulate.vcs | awk -f clean_v > $*.tab