#-----------------------------------------------------------------------------
# Makefile for freezer
# Tabs must be used to separate fields
# Don't let command line get too long, or it will mysteriously fail to link
#   with gcc.
#-----------------------------------------------------------------------------

RM = rm -f

# Add    -static    to end of the CFLAGS line to get a statically-linked version.
# Remove -Wall      if your compiler complains about complex.h (This occurs with
#                   some older versions of gcc).

LDFLAGS=-s 

# Linux - to make static version, '-static' must be first item in CFLAGS
CC=gcc
INCLUDES = -I. -I/usr/include -I/usr/include/ncurses
CFLAGS= -O3 -Wall
LIBS= -lm -lncurses
  
#-----------------------------------------------------------------------------
# Nothing to change beyond this point
#-----------------------------------------------------------------------------

all:: freezer alarmdial
# Each line here after the .o's must start with a tab.
freezer: freezer.o
	$(RM) $@ 
	$(CC) -o $@ $(CFLAGS) freezer.o $(LIBS) $(LDFLAGS)
freezer.o:  freezer.cc
	$(CC) -c $(CFLAGS) $(INCLUDES) freezer.cc
alarmdial: alarmdial.o
	$(RM) $@ 
	$(CC) -o $@ $(CFLAGS) alarmdial.o $(LIBS) $(LDFLAGS)
alarmdial.o:  alarmdial.cc
	$(CC) -c $(CFLAGS) $(INCLUDES) alarmdial.cc






