##
##	$VER: LVDemo_Makefile 2.1 (5.9.97)
##
##	Copyright (C) 1996,97 by Bernardo Innocenti
##
##	Makefile for GCC
##

###########################################################
# Name of the main executable
###########################################################
#
PROJ = LVDemo


###########################################################
# Package configuration
###########################################################
#

# set to OS30_ONLY to leave out support for old V37
# set to ANY_OS to make an executable for V37 with V39 support
#
OSVER = ANY_OS

# cpu to compile for.
#
CPU = 68020


###########################################################
# Object files in this project
###########################################################
#
OBJS = startup_gcc.o LVDemo.o ListViewHooks.o \
 ListViewClass.o ListBoxClass.o ScrollButtonClass.o


###########################################################
# Make the project
###########################################################
#
all: $(PROJ)


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


###########################################################
# Dependences
###########################################################
#
LVDemo.c ListViewClass.c: ListViewClass.h


###########################################################
# GCC Release version should be compiled with these flags
###########################################################
#
CC = gcc
CFLAGS = -c -O0 -finline-functions -fno-implement-inlines \
 -m$(CPU) -msmall-code -mregparm -fomit-frame-pointer \
 -I/gg/include -I/include -Wunused -Wreturn-type -D$(OSVER)
LFLAGS = -s
LIBS = -noixemul -nostdlib


###########################################################
# GCC - Make the executable
###########################################################
#

# Assemble startup code
#
startup_gcc.o: startup_gcc.s
	$(AS) startup_gcc.s -o startup_gcc.o

# Compile C sources and make the object files
#
.c.o: PIPClass.h
	$(CC) $(*).c $(CFLAGS)

# Link object files and make the executable
#
$(PROJ): $(OBJS)
	$(CC) $(OBJS) -o $(PROJ) $(LFLAGS) $(LIBS)
	@Protect $(PROJ) +e
