1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-05 22:43:24 +00:00
freebsd-ports/games/powerpak/files/Makefile.FreeBSD
Chris Piazza 1cd80d627d Import of powerpak.
PowerPak is an attempt at writing a high-level game programming
API for multiple platforms that uses the SDL libraries.  Currently
it is in need of optimizations, but it does have the basics.

PR:		13264
Submitted by:	Andrey Zakhvatov <andy@icc.surw.chel.su>
1999-08-21 20:20:46 +00:00

88 lines
2.5 KiB
Makefile

CC?=gcc
LOCALBASE?=/usr/local
CFLAGS+=-Wall -I${LOCALBASE}/include
LIBS=-L${LOCALBASE}/lib -lm -lSDL -lttf
OBJECTS=powerpak.o img.o img_gif.o img_ppm.o img_tif.o img_pcx.o img_bmp.o img_png.o img_jpg.o img_xxx.o \
PowerDraw/powerdraw.o PowerDraw/gfx.o PowerDraw/primitives.o PowerDraw/sprites.o PowerDraw/truetype.o \
PowerInput/keyboard.o PowerInput/mouse.o PowerInput/powerinput.o
all: splash libPP.a libPP.so
PowerDraw/powerdraw.o: PowerDraw/powerdraw.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
PowerDraw/gfx.o: PowerDraw/gfx.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
PowerDraw/primitives.o: PowerDraw/primitives.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
PowerDraw/sprites.o: PowerDraw/sprites.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
PowerDraw/truetype.o: PowerDraw/truetype.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
PowerInput/keyboard.o: PowerInput/keyboard.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
PowerInput/mouse.o: PowerInput/mouse.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
PowerInput/powerinput.o: PowerInput/powerinput.c
${CC} -o ${.TARGET} ${CFLAGS} -c ${.ALLSRC}
upgrade:splash installdirs
@echo "Deleting old libs from /usr/lib"
@rm -rf /usr/lib/libPP*
@rm -rf /usr/lib/libPD*
@rm -rf /usr/lib/libPI*
@echo "Deleting old headers from /usr/include/PowerPak"
@rm -rf /usr/include/PowerPak/*
@echo "Copying libraries to /usr/lib"
@cp *.a *.so /usr/lib/
@echo "Copying headers to /usr/include/PowerPak"
@cp *.h /usr/include/PowerPak/
@cp ./PowerDraw/*.h /usr/include/PowerPak/
@cp ./PowerInput/*.h /usr/include/PowerPak/
install: all installdirs
@echo "Copying libraries to /usr/lib"
@cp *.so *.a /usr/lib/
@echo "Copying headers to /usr/include/PowerPak"
@cp *.h /usr/include/PowerPak/
@cp ./PowerDraw/*.h /usr/include/PowerPak/
@cp ./PowerInput/*.h /usr/include/PowerPak/
uninstall: splash
@echo "Deleting libPP libs from /usr/lib"
@rm -rf /usr/lib/libPP*
@echo "Deleting headers from /usr/include/PowerPak"
@rm /usr/include/PowerPak/*
@echo "Removing directory /usr/include/PowerPak"
@rmdir /usr/include/PowerPak
clean:
@rm -rf *.o *.a *.so
@rm -rf ./PowerDraw/*.o
@rm -rf ./PowerInput/*.o
libPP.a: $(OBJECTS)
@echo "Building static library (libPP.a)"
@ar rvs libPP.a $(OBJECTS)
libPP.so: $(OBJECTS)
@echo "Building dynamic library (libPP.so)"
@$(CC) -D_REENTRANT -pthread -fpic -fPIC -shared -o libPP.so $(OBJECTS) $(LIBS)
splash:
@echo ""
@echo "Building PowerPak"
@echo ""
@cat ASCII-Logo
@echo ""
installdirs: mkinstalldirs
@./mkinstalldirs /usr/include/PowerPak