cnotes/MAKEFILE.TC
2026-01-30 12:06:07 +00:00

41 lines
1.0 KiB
Plaintext

# Makefile for cnotes - Turbo C++ 3.0 on DOS/Win32
# Strict C89/ANSI compliant build
#
# Usage from DOS/Windows command line:
# make -f makefile.tc
#
# Or rename to MAKEFILE and run:
# make
#
# Turbo C++ 3.0 should be in PATH, or adjust CC path below.
CC = tcc
CFLAGS = -A -w -ml -I.\include
# -A = ANSI keywords only
# -w = Enable all warnings
# -ml = Large memory model (for DOS)
# -I = Include path
SRCDIR = src
INCDIR = include
BUILDDIR = build
.c.obj:
$(CC) $(CFLAGS) -c -o$*.obj $<
all: $(BUILDDIR) $(BUILDDIR)\addnote.exe $(BUILDDIR)\dumpnotes.exe
$(BUILDDIR):
if not exist $(BUILDDIR) mkdir $(BUILDDIR)
$(BUILDDIR)\addnote.exe: $(SRCDIR)\addnote.c $(INCDIR)\platform.h
$(CC) $(CFLAGS) -e$(BUILDDIR)\addnote.exe $(SRCDIR)\addnote.c
$(BUILDDIR)\dumpnotes.exe: $(SRCDIR)\dumpnotes.c $(INCDIR)\platform.h
$(CC) $(CFLAGS) -e$(BUILDDIR)\dumpnotes.exe $(SRCDIR)\dumpnotes.c
clean:
if exist $(BUILDDIR)\*.exe del $(BUILDDIR)\*.exe
if exist $(BUILDDIR)\*.obj del $(BUILDDIR)\*.obj
if exist $(BUILDDIR) rmdir $(BUILDDIR)