-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (38 loc) · 980 Bytes
/
Copy pathMakefile
File metadata and controls
50 lines (38 loc) · 980 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
48
49
50
################
# OS Detection #
################
# On Windows, GNU Make exposes $(OS) = "Windows_NT".
# On macOS, uname -s returns "Darwin".
# Everything else is treated as Ubuntu/Linux.
ifeq ($(OS),Windows_NT)
PLATFORM := windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
PLATFORM := macosx
else
PLATFORM := linux
endif
endif
OS_MAKEFILE := Makefile.$(PLATFORM)
#############
# Variables #
#############
USER ?= $(shell whoami)
GIT_USER_NAME ?= "op://Private/github/name"
GIT_USER_EMAIL ?= "op://Private/github/email"
GIT_SSH_SIGNERS ?= "op://Private/github/signers"
GIT_SSH_CONFIGS_NAME ?= "id_github"
GIT_SSH_CONFIGS_PATH ?= "op://Private/github ssh"
###########
# Targets #
###########
all:
@echo "Building with $(OS_MAKEFILE)"
$(MAKE) -f $(OS_MAKEFILE) all
upgrade:
@echo "Upgrading with $(OS_MAKEFILE)"
$(MAKE) -f $(OS_MAKEFILE) upgrade
symlink:
@echo "Symlinking with $(OS_MAKEFILE)"
$(MAKE) -f $(OS_MAKEFILE) symlink