forked from rebecca/BSX
1
0
Fork 0
BSX/Makefile

27 lines
454 B
Makefile

# Variables
CC = gcc
CFLAGS = -Wall -Wextra -std=c11 -I/usr/local/include/SDL2
LDFLAGS = -L/usr/local/lib -lSDL2
SRC_DIR = src
SOURCES = $(wildcard $(SRC_DIR)/*.c)
OBJECTS = $(SOURCES:$(SRC_DIR)/%.c=%.o)
TARGET = bsx
# Default target
all: $(TARGET)
# Linking
$(TARGET): $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^
# Compiling
%.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -c -o $@ $<
# Clean up
clean:
rm -f $(OBJECTS) $(TARGET)
# Phony targets
.PHONY: all clean