honor CPPFLAGS

This commit is contained in:
Sebastian Ramacher 2011-11-11 16:14:29 +01:00
parent 44360dea93
commit 8386b3abf4
3 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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