##
# makefile
#
# AUTHORS: Robert Fahy <rfahy@ymail.com>
# CREDITS: the internet
# VERSION: 1.01
#
##

##
# TASK:
# - automation
#
##

##
# TODO:
# - n/a
#
##

CC=gcc
CFLAGS=-Wall -Wpointer-arith -Wstrict-prototypes -O2
PRGNAME=xorc2.exe
COMPILE=$(CC) $(CFLAGS) -c
OBJFILES:=$(patsubst %.c,%.o, $(wildcard *.c))

the_program: compile copy

compile: $(OBJFILES)
	$(CC) -o $(PRGNAME) $(OBJFILES)

%.o: %.c
	$(COMPILE) -o $@ $<

copy:
	cp -v $(PRGNAME) ../build/

clean:
	rm -v *~ *.exe *.o
