Parcourir la source

Merge pull request #166 from sjmulder/pr/makefile

Makefile portability tweaks
master
Arun Prakash Jana GitHub il y a 5 ans
Parent
révision
4fb96ba575
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 13 ajouts et 5 suppressions
  1. +13
    -5
      Makefile

+ 13
- 5
Makefile Voir le fichier

@@ -6,16 +6,24 @@ STRIP ?= strip
PKG_CONFIG ?= pkg-config
INSTALL ?= install

CFLAGS ?= -O3
CFLAGS += -Wall -Wextra -Wno-unused-parameter
CFLAGS_OPTIMIZATION ?= -O3

ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
CFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
LDLIBS += $(shell $(PKG_CONFIG) --libs ncursesw)
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncursesw)
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncursesw)
else ifeq ($(shell $(PKG_CONFIG) ncurses && echo 1),1)
CFLAGS_CURSES ?= $(shell $(PKG_CONFIG) --cflags ncurses)
LDLIBS_CURSES ?= $(shell $(PKG_CONFIG) --libs ncurses)
else
LDLIBS += -lncurses
LDLIBS_CURSES ?= -lncurses
endif

CFLAGS += -Wall -Wextra -Wno-unused-parameter
CFLAGS += $(CFLAGS_OPTIMIZATION)
CFLAGS += $(CFLAGS_CURSES)

LDLIBS += $(LDLIBS_CURSES)

DISTFILES = src nnn.1 Makefile README.md LICENSE
SRC = src/nnn.c
BIN = nnn


Chargement…
Annuler
Enregistrer