forked from rvaiya/warpd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (30 loc) · 752 Bytes
/
Makefile
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
VERSION=1.3.5
PREFIX?=/usr/local
COMMITSTR=$(shell commit=$$(git rev-parse --short HEAD 2> /dev/null) && echo " (built from: $$commit)")
ifeq ($(shell uname -s), Darwin)
PLATFORM?=macos
endif
ifeq ($(PLATFORM), macos)
VERSION:=$(VERSION)-osx
endif
%.o: %.c Makefile mk/*.mk
$(CC) -c $< -o $@ $(CFLAGS)
CFLAGS:=-g\
-Wall\
-Wextra\
-pedantic\
-Wno-deprecated-declarations\
-Wno-unused-parameter\
-std=c99\
-DVERSION='"v$(VERSION)$(COMMITSTR)"'\
-D_DEFAULT_SOURCE \
-D_FORTIFY_SOURCE=2 $(CFLAGS)
ifeq ($(PLATFORM), macos)
include mk/macos.mk
else ifeq ($(PLATFORM), windows)
include mk/windows.mk
else
include mk/linux.mk
endif
man:
scdoc < warpd.1.md | gzip > files/warpd.1.gz