# Depending on the platform, you need select the correct definition

HOST= cyg
MAKE= make
BASE_DIR = /w/programs/codas3

# Compiler command and options
CC= gcc
CFLAGS= -Wall
LDLIBS= -lm
#  GCC does not seem to need explicit specification of any
#  libraries such as the math lib, although it is recommended
#  as having higher quality versions of some routines.

# Other commands:
AR= ar rcv
RANLIB= ranlib
CP= cp -p
RM = rm -f
PERL = perl

# No permissions for DOS, so ignore chmod
CHMOD= echo

# nothing special required for linking
CCLINK = $(CC)


# Our own "unix cd" to handle paths with forward slashes:
CD = cd

# Permissions:
LIB_PERMISSION= 0644
BIN_PERMISSION= 0755

# Extensions:
EXE= .exe
OBJ= .o
LIB= .a

# For make clean:
DIRT = *$(OBJ) *.bak *.tmp *.rsp


# Disable builtin suffixes and rules, so we can
# be sure what is going on:
.SUFFIXES:
.SUFFIXES:
	$(OBJ) .c

# Now put in our default rule:
# GNU make pattern, instead of suffix rule
# The explicit -o option is required for cases where
# the source file is not in the current directory. It
# causes the object file to land in the source directory
# instead of the current directory.
%$(OBJ) : %.c
	$(CC) -c $(CFLAGS) $(INCLUDES) -o$*$(OBJ) $<

