forked from rebecca/BSX
Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
Rebecca Buckingham | f4653891c7 |
14
Makefile
14
Makefile
|
@ -1,24 +1,18 @@
|
|||
# Variables
|
||||
CC = gcc
|
||||
# Probably this won't work on a mac using xcode.
|
||||
# See https://stackoverflow.com/questions/3071321/how-to-use-pkg-config-for-setting-include-paths-in-xcode
|
||||
# for possible workarounds?
|
||||
# != is a GNU make extension, so may also not work on *BSD
|
||||
SDL_CFLAGS!=pkg-config --cflags sdl2
|
||||
SDL_LFLAGS!=pkg-config --libs sdl2
|
||||
CFLAGS = -Wall -Wextra -std=c11 $(SDL_CFLAGS)
|
||||
LDFLAGS = $(SDL_LFLAGS) -lm
|
||||
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) Makefile
|
||||
all: $(TARGET)
|
||||
|
||||
# Linking
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CC) -o $@ $^ $(LDFLAGS)
|
||||
$(CC) $(LDFLAGS) -o $@ $^
|
||||
|
||||
# Compiling
|
||||
%.o: $(SRC_DIR)/%.c
|
||||
|
|
Loading…
Reference in New Issue