]> Nishi Git Mirror - sp.git/commitdiff
GNU Make → BSD Make
author諏訪子 <suwako@076.moe>
Mon, 15 Apr 2024 15:39:52 +0000 (00:39 +0900)
committer諏訪子 <suwako@076.moe>
Mon, 15 Apr 2024 15:39:52 +0000 (00:39 +0900)
CHANGELOG.md
Makefile

index 3339f368a7261ed6cf38db815a676f281a2c8332..b0aca53a320356e2fe4c828443bf735b6aed562d 100644 (file)
@@ -1,5 +1,6 @@
 # 1.3.0
 * 英訳の追加
+* GNU Make → BSD Make
 
 # 1.2.0
 * やっとTOTP機能性を修正した
index b6f30ff717a360ba4588a3b1bd1d78457f713070..0f9269d0b623062251058ab44bfb2927963754ac 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,19 @@
-UNAME_S := $(shell uname -s)
+UNAME_S!=uname -s
 
-NAME := $(shell cat main.c | grep "const char\* sofname" | awk '{print $$5}' | sed "s/\"//g" | sed "s/;//" )
-VERSION := $(shell cat main.c | grep "const char\* version" | awk '{print $$5}' | sed "s/\"//g" | sed "s/;//" )
+NAME!=cat main.c | grep "const char\* sofname" | awk '{print $$5}' | sed "s/\"//g" | sed "s/;//"
+VERSION!=cat main.c | grep "const char\* version" | awk '{print $$5}' | sed "s/\"//g" | sed "s/;//"
+PREFIX=/usr/local
+
+.if ${UNAME_S} == "FreeBSD"
+MANPREFIX=${PREFIX}/share/man
+.elif ${UNAME_S} == "Linux"
 PREFIX=/usr
 MANPREFIX=${PREFIX}/share/man
-ifeq ($(UNAME_S),FreeBSD)
-       PREFIX=/usr/local
-endif
-ifeq ($(UNAME_S),OpenBSD)
-       PREFIX=/usr/local
-       MANPREFIX=${PREFIX}/man
-endif
-ifeq ($(UNAME_S),NetBSD)
-       PREFIX=/usr/pkg
-endif
+.elif ${UNAME_S} == "NetBSD"
+PREFIX=/usr/pkg
+MANPREFIX=${PREFIX}/share/man
+.endif
+
 CC=cc
 FILES=main.c showpass.c yankpass.c addpass.c delpass.c listpass.c genpass.c initpass.c otppass.c base32.c
 CFLAGS=-Wall -Wextra -O3 -I${PREFIX}/include -L${PREFIX}/lib