1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CC=clang INC_DIRS="." CFLAGS=-std=c99 -g -Wall -I$(INC_DIRS) LDFLAGS=-lpthread $(shell pkg-config --libs --cflags sdl2) all: chip8_emulator %.o: %.c $(CC) $(CFLAGS) -c $^ chip8_emulator: emulator.o main.c $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ clean: rm *.o chip8_emulator