#
#
# Makefile for tags.exe
#
# Created 03-28-91 JBK
# Last Modified 10-05-91 JBK
#

#
# The tags executable purposely does not link with the wild card expansion
# startup code included in MSC.  If you try to use this for tags then the
# sh style wild card expansions built into the executable will not function
# quite as expected.  The sort executable, however, does want setargv.obj
# to be linked in
#
SETARGV = c:\language\c600\lib\setargv.obj

#
# This is flags for optimized versions
FLAGS = /AL /G2 /Ocegilptz /Gs
LFLAGS = /E /F /PACKC /NOI /ST:0x8000


#
# This is FLAGS for debugging versions
#FLAGS = /AL /Od /Zi /qc
#LFLAGS = /CO /M /NOI /ST:0x8000


#
#  MSC CC

CC = cl $(FLAGS)
LINK = link $(LFLAGS)


SORT_DEFINES = -DSORT_MODULE -DSTDC_HEADERS -DUSG -D__STDC__

OBJS = arglist.obj asmtag.obj ctag.obj filmatch.obj flags.obj log.obj \
       shell.obj sortmod.obj tagio.obj validcrc.obj wildfile.obj

.c.obj:
    $(CC) /W4 -c $<

all: tags.exe sort.exe

tags.exe: $(OBJS)
    $(LINK) $**, $@;
    CRCSET $@

sort.exe: sort.c sort.h std.h
    $(CC) /W2 -F 8000 sort.c $(SETARGV) /link /NOE

shell.obj: flags.h log.h sort.h wildfile.h viruscrc.h \
           tagio.h ctag.h asmtag.h arglist.h flags.h

wildfile.obj: wildfile.h filmatch.h

filmatch.obj: filmatch.h

tagio.obj: arglist.h tagio.h log.h flags.h

log.obj: log.h

ctag.obj: ctag.h flags.h log.h tagio.h

asmtag.obj: asmtag.h flags.h tagio.h

sortmod.obj: sort.c sort.h std.h
    $(CC) /W2 -c -Fosortmod.obj $(SORT_DEFINES) sort.c

arglist.obj: arglist.h log.h

flags.obj: flags.h log.h

validcrc.obj: viruscrc.h


