47 lines
1.4 KiB
Plaintext
47 lines
1.4 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)\cnadd.exe $(BUILDDIR)\cndump.exe $(BUILDDIR)\cncount.exe $(BUILDDIR)\cndel.exe
|
|
|
|
$(BUILDDIR):
|
|
if not exist $(BUILDDIR) mkdir $(BUILDDIR)
|
|
|
|
$(BUILDDIR)\cnadd.exe: $(SRCDIR)\cnadd.c $(INCDIR)\platform.h $(INCDIR)\config.h
|
|
$(CC) $(CFLAGS) -e$(BUILDDIR)\cnadd.exe $(SRCDIR)\cnadd.c
|
|
|
|
$(BUILDDIR)\cndump.exe: $(SRCDIR)\cndump.c $(INCDIR)\platform.h $(INCDIR)\config.h
|
|
$(CC) $(CFLAGS) -e$(BUILDDIR)\cndump.exe $(SRCDIR)\cndump.c
|
|
|
|
$(BUILDDIR)\cncount.exe: $(SRCDIR)\cncount.c $(INCDIR)\platform.h $(INCDIR)\config.h
|
|
$(CC) $(CFLAGS) -e$(BUILDDIR)\cncount.exe $(SRCDIR)\cncount.c
|
|
|
|
$(BUILDDIR)\cndel.exe: $(SRCDIR)\cndel.c $(INCDIR)\platform.h $(INCDIR)\config.h
|
|
$(CC) $(CFLAGS) -e$(BUILDDIR)\cndel.exe $(SRCDIR)\cndel.c
|
|
|
|
clean:
|
|
if exist $(BUILDDIR)\*.exe del $(BUILDDIR)\*.exe
|
|
if exist $(BUILDDIR)\*.obj del $(BUILDDIR)\*.obj
|
|
if exist $(BUILDDIR) rmdir $(BUILDDIR)
|