Skip to content

Instantly share code, notes, and snippets.

@ZeronSix
Created August 7, 2017 15:31
Show Gist options
  • Save ZeronSix/2cb8dd1dac56b49152ade1e903b1a1cd to your computer and use it in GitHub Desktop.
Save ZeronSix/2cb8dd1dac56b49152ade1e903b1a1cd to your computer and use it in GitHub Desktop.
Makefile template
CC = gcc
CFLAGS = -Wall -std=c99
LDFLAGS = -lSDL2
SRC = $(wildcard *.c)
OBJ = $(notdir $(SRC:.c=.o))
all: raycasting_test
raycasting_test: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) -o $@
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
clean:
rm -rf *.o raycasting_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment