update Makefile and .gitignore
This commit is contained in:
10
Makefile
10
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 $@
|
||||
|
||||
Reference in New Issue
Block a user