diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2020-09-05 18:25:39 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2020-09-05 18:25:39 +0200 |
commit | c9333913641ec1b51725f918573d4faae7ecfc8f (patch) | |
tree | 30467ebaa10a67d15d1d7306b05dbd2912e0babc | |
parent | 85aeb601b330a43c04fd484b07499e18b2680e01 (diff) | |
download | polecat-c9333913641ec1b51725f918573d4faae7ecfc8f.tar.gz polecat-c9333913641ec1b51725f918573d4faae7ecfc8f.zip |
Update Makefile to make the life of packagers easier
-rw-r--r-- | Makefile | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -8,7 +8,6 @@ ifeq ($(TARGET),debug) endif PRETTY_OUTPUT ?= 1 -STATIC ?= 0 # CROSS COMPILATION SETUP CROSS ?= @@ -29,20 +28,20 @@ SRC_DIR := src FILES := $(filter-out $(BIN_DIR) $(OBJ_DIR), $(wildcard *)) # FLAGS -COMMONFLAGS := -ifneq ($(STATIC), 0) - COMMONFLAGS += -static -endif -ifeq ($(DEBUG),0) - COMMONFLAGS += -O2 -else - COMMONFLAGS += -g +CFLAGS ?= +LDFLAGS ?= + +ifeq ($(DEBUG),1) + CFLAGS += -g endif -CFLAGS := $(COMMONFLAGS) -Wall `$(PKGCONFIG) json-c --cflags` `$(PKGCONFIG) libarchive --cflags` `$(CURLCONFIG) --cflags` -LDFLAGS := `$(PKGCONFIG) json-c --libs` `$(PKGCONFIG) libarchive --libs` `$(CURLCONFIG) --libs` +CFLAGS += -Wall `$(PKGCONFIG) json-c --cflags` `$(PKGCONFIG) libarchive --cflags` `$(CURLCONFIG) --cflags` +LDFLAGS += `$(PKGCONFIG) json-c --libs` `$(PKGCONFIG) libarchive --libs` `$(CURLCONFIG) --libs` DEFINES := -DNAME=\"$(NAME)\" -DVERSION=\"$(VERSION)\" ifeq ($(DEBUG),1) DEFINES += -DDEBUG +else + # define NDEBUG to prevent assert and similar to cause problems + DEFINES += -DNDEBUG endif # SOURCE CODE AND OBJECT FILES |