Skip to content

Instantly share code, notes, and snippets.

@regmicmahesh
Created January 13, 2022 16:03
Show Gist options
  • Save regmicmahesh/2462a9ad002065c39d845d9d5d78b675 to your computer and use it in GitHub Desktop.
Save regmicmahesh/2462a9ad002065c39d845d9d5d78b675 to your computer and use it in GitHub Desktop.
CC = gcc
CFLAGS := $(shell sdl2-config --libs --cflags) -ggdb3 -O0 --std=c99 -Wall -lSDL2_image -lm
SRCS != find ./src -type f -name *.c
HEADS != find ./includes -type f -name *.h
OBJS := $(SRCS:.c=.o)
INCLUDES := -I ./includes
TARGET := main
all: $(TARGET)
$(TARGET): $(OBJS) $(HEADS)
$(CC) $(INCLUDES) $(CFLAGS) -o $@ $(OBJS)
clean:
rm -rf $(TARGET) $(OBJS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment