# Makefile for the desk_scan and merge programs.
CC = gcc

CFLAGS = -O2 -Wall -g

all : desk_scan merge

merge : merge.c
	$(CC) $(CFLAGS) merge.c -o merge
	strip merge

desk_scan : desk_scan.o pgm.o
	$(CC) $(CFLAGS) -lm -o desk_scan desk_scan.o pgm.o
	strip desk_scan

desk_scan.o : desk_scan.c pgm.h
	$(CC) $(CFLAGS) -c desk_scan.c

pgm.o : pgm.c pgm.h
	$(CC) $(CFLAGS) -c pgm.c

clean : 
	rm -f desk_scan merge *.o *~ a.out core
