mirror of
https://codeberg.org/andyscott/marCsweep.git
synced 2024-11-12 15:20:49 -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
|
||||
CFLAGS =
|
||||
CFLAGS = -std=gnu11
|
||||
CPPFLAGS = -Iinclude -MMD -MP
|
||||
|
||||
SRCDIR = src
|
||||
|
||||
SRCS = $(wildcard $(SRCDIR)/*.c)
|
||||
OBJS = $(patsubst $(SRCDIR)/%.c,%.o,$(SRCS))
|
||||
EXE = gc
|
||||
SRCS := $(wildcard $(SRCDIR)/*.c)
|
||||
OBJS := $(patsubst $(SRCDIR)/%.c,%.o,$(SRCS))
|
||||
EXE = gc
|
||||
|
||||
DBDIR = debug
|
||||
DBEXE = $(DBDIR)/$(EXE)
|
||||
DBOBJS = $(addprefix $(DBDIR)/, $(OBJS))
|
||||
DBCFLAGS = -g -O0 -DDEBUG
|
||||
DBDIR = debug
|
||||
DBEXE := $(DBDIR)/$(EXE)
|
||||
DBOBJS := $(addprefix $(DBDIR)/, $(OBJS))
|
||||
DBCFLAGS = -g -O0 -DDEBUG
|
||||
|
||||
REDIR = bin
|
||||
REEXE = $(REDIR)/$(EXE)
|
||||
REOBJS = $(addprefix $(REDIR)/, $(OBJS))
|
||||
RECFLAGS = -O3 -Wall -Wextra -Wpedantic -Werror
|
||||
|
||||
REDIR = bin
|
||||
REEXE := $(REDIR)/$(EXE)
|
||||
REOBJS := $(addprefix $(REDIR)/, $(OBJS))
|
||||
RECFLAGS = -O3 -Wall -Wextra -Wpedantic -Werror
|
||||
|
||||
.PHONY: all clean debug prep release
|
||||
|
||||
|
@ -43,3 +44,5 @@ prep:
|
|||
|
||||
clean:
|
||||
rm -rf $(DBDIR) $(REDIR)
|
||||
|
||||
-include $(OBJ:.o=.d)
|
||||
|
|
Loading…
Reference in a new issue