diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-20 21:22:31 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-20 21:22:47 +0100 |
commit | 48a06eb30e92095b465c73d4c06b925c29f0c73e (patch) | |
tree | a893b6f1c60fd8ca7f4c29b944fac49824be4ded /Makefile | |
parent | Refractoring: Refractored the stepping of the PC into a function (diff) | |
download | CHIP8-Emulator-48a06eb30e92095b465c73d4c06b925c29f0c73e.tar.gz CHIP8-Emulator-48a06eb30e92095b465c73d4c06b925c29f0c73e.tar.bz2 CHIP8-Emulator-48a06eb30e92095b465c73d4c06b925c29f0c73e.zip |
Refractoring: Refractored the Makefile to make use of pkg-config
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile index 2bc39b7..6ba62c8 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ -CC=egcc -CFLAGS=-std=c99 -g -Wall -I. -lpthread -lSDL2 +CC=clang +INC_DIRS="." +CFLAGS=-std=c99 -g -Wall -I$(INC_DIRS) +LDFLAGS=-lpthread $(shell pkg-config --libs --cflags sdl2) all: chip8_emulator @@ -7,7 +9,7 @@ all: chip8_emulator $(CC) $(CFLAGS) -c $^ chip8_emulator: emulator.o main.c - $(CC) $(CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ clean: rm *.o chip8_emulator |