-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommon.mk
More file actions
47 lines (36 loc) · 882 Bytes
/
common.mk
File metadata and controls
47 lines (36 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# makefile variables and rules shared by both gkrellm and gkrellmd
ifdef CROSS
# enforce overriding tools for mxe cross builds (http://mxe.cc)
CC = $(CROSS)gcc
AR = $(CROSS)ar
PKG_CONFIG = $(CROSS)pkg-config
WINDRES = $(CROSS)windres
else
CC ?= gcc
AR ?= ar
PKG_CONFIG ?= pkg-config
WINDRES ?= windres
endif
# Make configure use identical environment
export CC
export PKG_CONFIG
PREFIX ?= /usr/local
INSTALLROOT ?= $(DESTDIR)$(PREFIX)
BINMODE ?= 755
BINEXT ?=
INSTALLDIRMODE ?= 755
INCLUDEDIR ?= $(INSTALLROOT)/include
INCLUDEMODE ?= 644
INCLUDEDIRMODE ?= 755
LIBDIR ?= $(INSTALLROOT)/lib
LIBDIRMODE ?= 755
MANMODE ?= 644
MANDIRMODE ?= 755
INSTALL ?= install
STRIP ?= -s
LINK_FLAGS ?= -Wl,-E
SHARED_PATH = ../shared
# Make GNU Make search for sources somewhere else as well
VPATH = $(SHARED_PATH)
%.o: %.c
$(CC) -c -Wall $(FLAGS) $(CFLAGS) $(CPPFLAGS) $< -o $@