######################################################################
# A simple makefile (Windows) for CTC++ demo
#
#                  Copyright (c) 2000 Testwell Oy
######################################################################

######################################################################
# Compiler flags

CC	= cl
LINK32	= cl
CFLAGS  = -c
LFLAGS  = -Fe
CLIB    = lib
CLIBL   = /OUT:

#
# ===================================================================

# Executable name
EXENAME = multilib.exe

# Sourcefiles and objectfiles
SRCS    = strutil.c reverse.c main.c
OBJS    = $(SRCS:.c=.obj)

# Rule for compiling .c files:
.c.obj:
	$(CC) $(CFLAGS) $<

all: $(OBJS) libcomp progcomp

# library compilation
libcomp:
   $(CLIB) $(CLIBL)strutil.lib strutil.obj $(LIBEND)
   $(CLIB) $(CLIBL)reverse.lib reverse.obj $(LIBEND)

# Program compilation and linking
progcomp:
   $(LINK32) $(LFLAGS)$(EXENAME) main.obj strutil.lib reverse.lib

clean:
   if exist *.obj del *.obj
   if exist *.lib del *.lib
   if exist $(EXENAME) del $(EXENAME)
