##
##	$VER: PIPWin_Makefile 2.6 (19.10.98)
##
##	Copyright (C) 1996,97 by Bernardo Innocenti
##
##	Makefile for gcc
##

# Name of the final executable
#
PROJ = PIPWin

# Object files in this project
#
OBJS = startup_gcc.o PIPWin.o PIPClass.o

# C compiler name
#
CC = gcc

# Make the project
#
all: $(PROJ)

# Remove all targets and intermediate files
#
clean:
	-Delete $(PROJ) $(OBJS)


###########################################################
# gcc release version should be compiled with these flags
#
# NOTE: compiling with -fbaserel is currently not
#       possible because of the well known gcc/egcs
#		"register spilled" problem.
#
CFLAGS = -c -O3 -finline-functions -fno-implement-inlines \
 -fomit-frame-pointer -fstrength-reduce \
 -msmall-code -mregparm -I/gg/include -I/include \
 -Wunused -Wreturn-type -D$(OSVER)
LFLAGS = -s
LIBS = -noixemul -nostdlib


###########################################################
# gcc - Make the executable
###########################################################
#
startup_gcc.o: startup_gcc.s
	$(AS) startup_gcc.s -o startup_gcc.o

.c.o: VectorGlyphIClass.h
	$(CC) $(*).c $(CFLAGS)

$(PROJ): $(OBJS)
	$(CC) $(OBJS) -o $(PROJ) $(LFLAGS) $(LIBS)
	@Protect $(PROJ) +e
