From 4ada97372adf6ae579dd9293449d43c565d6936e Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 13 May 2016 07:56:06 +0200 Subject: [PATCH] Use sdl-config and pkg-config to add compiler flags. --- Makefile | 6 ++++-- main.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e6c5225..ff96b21 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,11 @@ SRC=main.c apr.c mem.c tty.c #CFLAGS= -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ # -Wno-bitwise-op-parentheses CFLAGS= -fno-diagnostics-show-caret \ - -L/usr/local/lib -I/usr/local/include -lSDL -lSDL_image -lpthread + `sdl-config --cflags` `pkg-config SDL_image --cflags` + +LIBS= `sdl-config --libs` `pkg-config SDL_image --libs` -lpthread pdp6: $(SRC) pdp6.h - $(CC) $(CFLAGS) $(SRC) -o pdp6 + $(CC) $(CFLAGS) $(SRC) $(LIBS) -o pdp6 diff --git a/main.c b/main.c index 2110d8c..a359e15 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,6 @@ #include "pdp6.h" -#include -#include +#include +#include #include #include #include