mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 05:55:46 +01:00
add language and standard parameters to the compilation process
This commit is contained in:
8
makefile
8
makefile
@@ -2,8 +2,10 @@ NAME = sdl_template
|
|||||||
|
|
||||||
# compiler settings
|
# compiler settings
|
||||||
CC := clang
|
CC := clang
|
||||||
CFLAGS = $(shell pkg-config --cflags sdl2) -Wall -g
|
STD := c17
|
||||||
LDFLAGS = $(shell pkg-config --libs sdl2) -lm
|
LANG = c
|
||||||
|
CFLAGS := $(shell pkg-config --cflags sdl2) -Wall -g
|
||||||
|
LDFLAGS := $(shell pkg-config --libs sdl2) -lm
|
||||||
|
|
||||||
# file locations
|
# file locations
|
||||||
DIR_BIN := bin
|
DIR_BIN := bin
|
||||||
@@ -35,7 +37,7 @@ $(TARGET): $(OBJ)
|
|||||||
# creates .o and .d files, include a flag for no unused command line arguments, because in this context it's unneeded
|
# creates .o and .d files, include a flag for no unused command line arguments, because in this context it's unneeded
|
||||||
$(DIR_OBJ)/$(ARCH)/%.o: src/%.c
|
$(DIR_OBJ)/$(ARCH)/%.o: src/%.c
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
$(CC) -o $@ -MD -MP -c $< $(CFLAGS) -Wno-unused-command-line-argument
|
$(CC) -o $@ -MD -MP -c $< $(CFLAGS) -std=$(STD) -x $(LANG) -Wno-unused-command-line-argument
|
||||||
|
|
||||||
$(DIR):
|
$(DIR):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|||||||
Reference in New Issue
Block a user