mirror of
https://codeberg.org/andyscott/marCsweep.git
synced 2025-01-02 23:05:55 -05:00
Makefile: overhaul variables, std=gnu11 for now
This commit is contained in:
parent
c73dfc2c00
commit
0747e78b15
1 changed files with 15 additions and 12 deletions
27
Makefile
27
Makefile
|
@ -1,22 +1,23 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS =
|
CFLAGS = -std=gnu11
|
||||||
CPPFLAGS = -Iinclude -MMD -MP
|
CPPFLAGS = -Iinclude -MMD -MP
|
||||||
|
|
||||||
SRCDIR = src
|
SRCDIR = src
|
||||||
|
|
||||||
SRCS = $(wildcard $(SRCDIR)/*.c)
|
SRCS := $(wildcard $(SRCDIR)/*.c)
|
||||||
OBJS = $(patsubst $(SRCDIR)/%.c,%.o,$(SRCS))
|
OBJS := $(patsubst $(SRCDIR)/%.c,%.o,$(SRCS))
|
||||||
EXE = gc
|
EXE = gc
|
||||||
|
|
||||||
DBDIR = debug
|
DBDIR = debug
|
||||||
DBEXE = $(DBDIR)/$(EXE)
|
DBEXE := $(DBDIR)/$(EXE)
|
||||||
DBOBJS = $(addprefix $(DBDIR)/, $(OBJS))
|
DBOBJS := $(addprefix $(DBDIR)/, $(OBJS))
|
||||||
DBCFLAGS = -g -O0 -DDEBUG
|
DBCFLAGS = -g -O0 -DDEBUG
|
||||||
|
|
||||||
REDIR = bin
|
|
||||||
REEXE = $(REDIR)/$(EXE)
|
REDIR = bin
|
||||||
REOBJS = $(addprefix $(REDIR)/, $(OBJS))
|
REEXE := $(REDIR)/$(EXE)
|
||||||
RECFLAGS = -O3 -Wall -Wextra -Wpedantic -Werror
|
REOBJS := $(addprefix $(REDIR)/, $(OBJS))
|
||||||
|
RECFLAGS = -O3 -Wall -Wextra -Wpedantic -Werror
|
||||||
|
|
||||||
.PHONY: all clean debug prep release
|
.PHONY: all clean debug prep release
|
||||||
|
|
||||||
|
@ -43,3 +44,5 @@ prep:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(DBDIR) $(REDIR)
|
rm -rf $(DBDIR) $(REDIR)
|
||||||
|
|
||||||
|
-include $(OBJ:.o=.d)
|
||||||
|
|
Loading…
Reference in a new issue