# Compiler
CC=ppc386
# Parameters given to the compiler
CFLAGS=-S2 -Sg -Un -O1 -Op1 -WG -FuC:\pp\units\win32\rtl \
                                -FlC:\pp\units\win32\rtl \
                                -FDC:\PP\BIN\WIN32 \
                                -kRSRC.o

# Output filename (*.exe)
OUTPUT="Example.exe"

# Source files
SRCS1="Example.pas"
SRCS2="libgfl.pas"
SRCS3="Scrollbars.pas"

# Standard targets

all: compile_res libgfl_pas scrollbars_pas
	$(CC) $(SRCS1) $(CFLAGS)

libgfl_pas:
	$(CC) $(SRCS2) $(CFLAGS)

scrollbars_pas:
	$(CC) $(SRCS3) $(CFLAGS)

compile_res:
	windres --include-dir C:\pp\bin\win32 -I rc -O coff -i RSRC.RC -o RSRC.o --preprocessor cpp

test: all
	$(OUTPUT)

clean:
	del *.o
	del *.ow
	del *.ppw

mrproper: clean

