# Makefile for brik
# ::[[ @(#) makefile.nix 1.2 89/07/08 10:41:32 ]]::

# Please see brik.h for configuration options.

# Make sure this file is called "makefile" (rename it if necessary).  Then
# type one of the following.
#
# "make"            -- makes brik in current directory
# "make install"    -- makes brik, then moves it into DESTDIR defined below
# "make clean"      -- deletes "core", objects, and executable

# Directory where we want to move executable brik on "make install"
DESTDIR=/usr/local/bin/.

# CFLAGS and CMORE are flags for the C compiler. 
# LDFLAGS and LDMORE are flags for the loader.

CFLAGS=-O -DDEBUG -DATARI
LDFLAGS=

CC=gcc
LD=gcc

.c.o :
	$(CC) -c $(CFLAGS) $*.c

OBJS = atari.o brik.o initcrc.o addbfcrc.o

all:	brik.ttp

brik.ttp: $(OBJS)
	$(LD) $(LDFLAGS) -o brik.ttp $(OBJS)

brik.o: brik.c brik.h assert.h

initcrc.o: initcrc.c brik.h

install: brik
	mv brik.ttp $(DESTDIR)/brik.ttp

clean:
	rm -f $(OBJS)  brik.ttp
