diff --git a/getSDLKey/Makefile b/getSDLKey/Makefile index 88ca9d1a..2bb65883 100644 --- a/getSDLKey/Makefile +++ b/getSDLKey/Makefile @@ -1,18 +1,17 @@ -PREFIX = /usr -OUTFILE = getSDLKey - -CC = gcc -OBJS = getSDLKey.o -LIBS = -lSDL - - -all: ${OBJS} - ${CC} -o ${OUTFILE} ${LIBS} ${OBJS} - -clean: - rm -f ${OUTFILE} ${OBJS} - -install: - install -m 755 -D getSDLKey ${PREFIX}/bin/getSDLKey - -getSDLKey.o = getSDLKey.cpp +PREFIX = /usr +OUTFILE = getSDLKey + +CC = g++ +OBJS = getSDLKey.o +LIBS = $(shell sdl-config --cflags --libs) + +all: ${OBJS} + ${CC} -o ${OUTFILE} ${OBJS} ${LIBS} + +clean: + rm -f ${OUTFILE} ${OBJS} + +install: + install -m 755 -D getSDLKey ${PREFIX}/bin/getSDLKey + +getSDLKey.o = getSDLKey.cpp