Commit 8386b3ab authored by Sebastian Ramacher's avatar Sebastian Ramacher

honor CPPFLAGS

parent 44360dea
......@@ -30,12 +30,12 @@ options:
%.o: %.c
$(ECHO) CC $<
@mkdir -p .depend
$(QUIET)${CC} -c ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
%.do: %.c
$(ECHO) CC $<
@mkdir -p .depend
$(QUIET)${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
# force recompilation of database.o if DATABASE has changed
database.o: database-${DATABASE}.o
......
......@@ -50,7 +50,9 @@ cc_open(girara_session_t* session, const char* input)
#endif
char cwd[path_max];
getcwd(cwd, path_max);
if (getcwd(cwd, path_max) == NULL) {
goto error_free;
}
char* tmp_path = g_strdup_printf("%s/%s", cwd, path);
if (tmp_path == NULL) {
......
......@@ -29,7 +29,8 @@ INCS = ${GIRARA_INC} ${GTK_INC}
LIBS = ${GIRARA_LIB} ${GTK_LIB} $(DL_LIB) -lpthread -lm
# flags
CFLAGS += -std=c99 -pedantic -Wall -Wno-format-zero-length -Wextra $(INCS) -DZATHURA_PLUGINDIR=\"${PLUGINDIR}\"
CFLAGS += -std=c99 -pedantic -Wall -Wno-format-zero-length -Wextra $(INCS)
CPPFLAGS += -DZATHURA_PLUGINDIR=\"${PLUGINDIR}\"
# debug
DFLAGS ?= -g
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment