From 59604b5b66600b964e5b267a9d68b9ee01fda54e Mon Sep 17 00:00:00 2001 From: Bogomil Vasilev Date: Sat, 12 Jan 2019 17:07:06 +0200 Subject: [PATCH] update Makefile and .gitignore --- .gitignore | 3 ++- Makefile | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d1bef6c..6986e30 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ rmps.config rmps.files -rmps.creator +rmps.creator* rmps.includes +*.test tmp/* obj/* *.bak diff --git a/Makefile b/Makefile index 36423d5..8c51ad5 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,13 @@ override LDFLAGS += $(shell mysql_config --libs) # You may simply check the flags later with: # $ readelf -p .GCC.command.line rmpsd ifeq ($(DEBUG), yes) - CFLAGS += -frecord-gcc-switches -g + ifeq ($(CC), clang) + override CFLAGS += -grecord-gcc-switches -g + # Clang 8 starts supporitng -grecord-command-line + # Older versions will raise an error. + else + override CFLAGS += -frecord-gcc-switches -g + endif endif SRCDIR = src @@ -29,6 +35,8 @@ OBJECTS := $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o) EXECUTABLE = rmpsd INSTALLDIR := $(DESTDIR)/usr/bin +all: $(BUILDDIR)/$(EXECUTABLE) + $(BUILDDIR)/$(EXECUTABLE): $(OBJECTS) ifeq ($(VERBOSE), yes) $(CC) $(OBJECTS) $(LDFLAGS) -o $@