options:
@echo "$(PROJECT) build options:"
- @echo "LIBS = $(LIBS)"
- @echo "CC = $(CC)"
- @echo "CFLAGS = $(CFLAGS)"
- @echo "CPPFLAGS = $(CPPFLAGS)"
- @echo "LDFLAGS = $(LDFLAGS)"
+ @echo "LIBS = $(LIBS)"
+ @echo "CFLAGS = $(CFLAGS)"
+ @echo "LDFLAGS = $(LDFLAGS)"
+ @echo "CC = $(CC)"
src/hints.o: src/hints.js.h
src/hints.js.h: src/hints.js
%.o: %.c %.h
@echo "${CC} $<"
- @$(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
+ @$(CC) -c -o $@ $< $(CFLAGS)
debug: $(DTARGET)
%.do: %.c %.h
@echo "${CC} $<"
- @$(CC) -c -o $@ $< $(CPPFLAGS) $(DFLAGS)
+ @$(CC) -c -o $@ $< $(DFLAGS)
install: $(TARGET) doc/$(MAN1)
install -d $(DESTDIR)$(BINDIR)
LIBS += $(GTK2LIBS)
endif
-CFLAGS += $(shell pkg-config --cflags $(LIBS))
-CFLAGS += -Wall
-CFLAGS += -pipe
-CFLAGS += -ansi
-CFLAGS += -std=c99
-CFLAGS += -pedantic
-CFLAGS += -Wmissing-declarations
-CFLAGS += -Wmissing-parameter-type
-CFLAGS += -Wno-overlength-strings
-
-LDFLAGS += $(shell pkg-config --libs $(LIBS)) -lX11 -lXext -lm
-
-CPPFLAGS += -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=500
+CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=500
CPPFLAGS += -DPROJECT=\"${PROJECT}\"
ifeq ($(USEGTK3), 1)
CPPFLAGS += -DHAS_GTK3
endif
-#----------------developer options-------------------
-DFLAGS += $(CFLAGS)
-DFLAGS += -DDEBUG
-DFLAGS += -ggdb
-DFLAGS += -g
+CFLAGS += $(shell pkg-config --cflags $(LIBS))
+CFLAGS += -Wall -pipe -ansi -std=c99 -pedantic
+CFLAGS += -Wmissing-declarations -Wmissing-parameter-type -Wno-overlength-strings
+CFLAGS += ${CPPFLAGS}
+
+LDFLAGS += $(shell pkg-config --libs $(LIBS)) -lX11 -lXext -lm
+
+DFLAGS += $(CFLAGS) -DDEBUG -ggdb -g
-#----------------end of options----------------------
OBJ = $(patsubst %.c, %.o, $(wildcard src/*.c))
DOBJ = $(patsubst %.c, %.do, $(wildcard src/*.c))
DEPS = $(OBJ:%.o=%.d)
DIST_FILE = $(PROJECT)_$(VERSION).tar.gz
MANDIR1 = $(MANDIR)/man1
MAN1 = $(PROJECT).1
-
-FMOD = 0644
-
-MFLAGS = --no-print-directory