#########################################
# There is a need to define GSCdat, 
# the root of the directory structure
# containing the 9,000 files.
# GSCdat = /gsc
#
#########################################
#
##### Turbo-C Definitions on PCs
CC    = tcc -I. -mh -O -Z -G -N
CLEAN = del *.obj
SLIB  =
COPY  = copy
##### Unix definitions
#CC    = cc -I. -O
#CLEAN = strip a.out ; rm *.o ; mv a.out $@
#SLIB  = -lm
#COPY  = cp -p
#########################################

UTIL = prtgsc.c dispos.c decode_c.c get_head.c find_reg.c \
	to_d.c dtos.c
PGMS =  gsc.exe genreg.exe decode.exe
LIB  = gsc.lib

#SUFFIXES: .c .obj
#.c.obj:
#	$(CC) -c $*

#default: decode.exe gsc.exe

gsc.exe: gsc.c $(UTIL) gsc.h
	$(CC) gsc.c $(UTIL) $(SLIB)
	$(CLEAN)

genreg.exe: genreg.c  get_head.c find_reg.c prtgsc.c dtos.c gsc.h
	$(CC) genreg.c get_head.c prtgsc.c find_reg.c dtos.c 
	$(CLEAN)

decode.exe: decode.c decode_c.c get_head.c prtgsc.c dtos.c gsc.h
	$(CC) decode.c decode_c.c get_head.c prtgsc.c dtos.c $(SLIB)
	$(CLEAN)

all: $(PGMS)

install: $(PGM)
	$(COPY) gsc.exe decode.exe ../bin
	genreg.exe -b
