1
0
mirror of https://github.com/aap/pdp6.git synced 2026-01-13 15:27:46 +00:00

Use sdl-config and pkg-config to add compiler flags.

This commit is contained in:
Lars Brinkhoff 2016-05-13 07:56:06 +02:00
parent 1452e2c856
commit 4ada97372a
2 changed files with 6 additions and 4 deletions

View File

@ -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

4
main.c
View File

@ -1,6 +1,6 @@
#include "pdp6.h"
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL.h>
#include <SDL_image.h>
#include <pthread.h>
#include <time.h>
#include <unistd.h>