aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index d5b07eb..41be2b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,16 @@
CC?=gcc
XFLAGS=-D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L
-CFLAGS?=-std=c99 -O2 -Wall $(XFLAGS)
+CFLAGS?=-std=c11 -O2 -Wall $(XFLAGS)
LIBS:=-lexif
LIBS+=$(shell pkg-config --cflags --libs GraphicsMagickWand)
-IDIRS:=$(addprefix -iquote,include unja/src unja parcini/include)
+IDIRS:=$(addprefix -iquote,include roscha roscha/include parcini/include)
BUILDIR?=build/release
ifdef DEBUG
BUILDIR:=build/debug
-CFLAGS:=-std=c99 -O0 -g -DDEBUG $(XFLAGS)
+CFLAGS:=-std=c11 -O0 -DDEBUG $(XFLAGS) -g
endif
ifdef ASAN
CFLAGS+= -fsanitize=address -fno-omit-frame-pointer
@@ -18,13 +18,13 @@ endif
OBJDIR=$(BUILDIR)/obj
-UNJA_SRCS+=$(shell find unja -name '*.c' -not -path '*/tests/*')
-UNJA_OBJS:=$(UNJA_SRCS:%.c=$(OBJDIR)/%.o)
+ROSCHA_SRCS+=$(shell find roscha -name '*.c' -not -path '*/tests/*')
+ROSCHA_OBJS:=$(ROSCHA_SRCS:%.c=$(OBJDIR)/%.o)
PARCINI_SRCS:=$(wildcard parcini/src/*.c)
PARCINI_OBJS:=$(PARCINI_SRCS:%.c=$(OBJDIR)/%.o)
REVELA_SRCS:=$(shell find src -name '*.c' -not -path '*/tests/*')
REVELA_OBJS:=$(REVELA_SRCS:%.c=$(OBJDIR)/%.o)
-ALL_OBJS:=$(UNJA_OBJS) $(PARCINI_OBJS) $(REVELA_OBJS)
+ALL_OBJS:=$(ROSCHA_OBJS) $(PARCINI_OBJS) $(REVELA_OBJS)
TEST_OBJS:=$(filter-out $(OBJDIR)/src/revela.o,$(ALL_OBJS))
all: revela
@@ -33,15 +33,15 @@ test: tests/config tests/fs
tests/%: $(OBJDIR)/src/tests/%.o $(TEST_OBJS)
mkdir -p $(BUILDIR)/$(@D)
- $(CC) -o $(BUILDIR)/$@ $^ $(LDFLAGS) $(IDIRS) $(LIBS)
+ $(CC) -o $(BUILDIR)/$@ $^ $(IDIRS) $(LIBS) $(CFLAGS)
$(OBJDIR)/%.o: %.c
mkdir -p $(@D)
- $(CC) -c $(CFLAGS) $(IDIRS) -o $@ $< $(LIBS)
+ $(CC) -c $(IDIRS) -o $@ $< $(LIBS) $(CFLAGS)
revela: $(ALL_OBJS)
mkdir -p $(@D)
- $(CC) $(LDFLAGS) -o $(BUILDIR)/$@ $^ $(LIBS) $(CFLAGS)
+ $(CC) -o $(BUILDIR)/$@ $^ $(LIBS) $(CFLAGS)
clean:
rm -r build