# Makefile for linux gcc
# "gcc --version" produces version message
#
SWITCHES=-c -I.
SRC=../src
CC=gcc -Os -fno-builtin -fno-strength-reduce -fomit-frame-pointer -finline-functions
v.exe: pietmp.o piesetup.h pie.h pieproto.h pietmp.c pihelpbu.exe pihelptmp.c
	$(CC) -s pietmp.o -o v.exe -lm
	rm -f pietmp.o pietmp.c pie.h pieproto.h pihelptmp.o pihelptmp.c
	ls -l v.exe pihelpbu.exe
pietmp.o: pie.h pieproto.h pietmp.c
	$(CC) $(SWITCHES) pietmp.c
pietmp.c: $(SRC)/pie.c
	cp -p $(SRC)/pie.c ./pietmp.c
pie.h: $(SRC)/pie.h
	cp -p $(SRC)/pie.h ./pie.h
pieproto.h: $(SRC)/pieproto.h
	cp -p $(SRC)/pieproto.h ./pieproto.h
pihelptmp.c: $(SRC)/pihelpbu.c
	cp -p $(SRC)/pihelpbu.c pihelptmp.c
pihelpbu.exe: pihelptmp.c
	$(CC) -s -o pihelpbu.exe pihelptmp.c
