# Makefile for locale.lib
# Copyright (c) 1997 by Timofey Bondarenko

# Common Definitions
INSTALLDIR =..\..\OBJ

!if 1
# Definitions for Borland C++
# make -N must be used for '<<' operator...
.AUTODEPEND
AR =tlib /C
INCLUDEDIR =-ID:\BC45\INCLUDE
# -w-pia = Disable "Possibly Incorrect Assignement" Warning
!if 0
# Definitions for Borland C 16-bit
CC =bcc -w-pia
!if 0
# Definitions for Borland, MS-DOS 16-bit
CFLAGS =-O1 -ml -2 -Y -d -zCLOCALE_TEXT -zR_DATA -zTDATA
# -ml = Large Model; -2 = 286 Code Set; -Y = Overlay Support
# -d = merge dup.string
# also -DSTRFTIME_EXT=1 can be used
!else
# Definitions for Borland, Windows 16-bit
CFLAGS =-O1 -ml -3 -d -dc -WSE -D_RTLDLL -DWIN_ABBR_LC
# -dc = const in CODEseg
# -WSE = Windows,Smart-Callback,Explict-Exportable
# also -D_LC_WIN and -DUSE_OLENLS can be used
!endif
!else
# Definitions for Borland C, Win32
CC =bcc32 -w-pia
CFLAGS =-O1 -d -D_RTLDLL -DWIN_ABBR_LC
!endif

!else
# Definitions for Microsoft C
CC =cl /nologo
AR =lib /NOIGNORECASE
INCLUDEDIR =-ID:\MSVC15\INCLUDE

# Definitions for Microsoft, MS-DOS 16-bit Apps
CFLAGS =/O1 /AL /G2 /Gs /Gf /NT_TEXT /ND_DATA /W3
# /AL = Large Model; /G2 = 286 Code Set; /W3 = warnings
# /Gs = No ChkStack; /Gf = merge dup.string
!endif

OBJS =doslocal.obj locale.obj lc_chars.obj lc_time.obj lc_numm.obj \
lc_table.obj strftime.obj time_fmt.obj time_txt.obj asctime.obj \
str_uplw.obj strcoll.obj stricmp.obj strxfrm.obj to_uplw.obj
# fnumb.obj

# Implicit Rules
.c.obj :
	$(CC) $(CFLAGS) $(INCLUDEDIR) -c { $< }

.cpp.obj :
	$(CC) $(CFLAGS) $(INCLUDEDIR) -c { $< }

# Destinations

all: locale.lib

install: $(INSTALLDIR)/locale.lib

$(INSTALLDIR)/locale.lib: locale.lib
        copy locale.lib $(INSTALLDIR)

clean:
	del *.obj
	del *.lib
	del *.bak

locale.lib: $(OBJS)
	del $@
        $(AR) $@ @<<
+$(OBJS:.obj = +),,
<<

!include depends