about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-01-11 07:27:14 +0300
committerNakidai <nakidai@disroot.org>2025-01-11 07:27:14 +0300
commit8105553dfafc2739059463ec4c2403483d6d3f8e (patch)
treec20a4fdebf94dfdedc8c0132499576d8b2f5bd0e
parent76b5c8f43f73172cd603bf1279987d74a32acade (diff)
downloadtr2cyr-master.tar.gz
tr2cyr-master.zip
Fix Makefile for BSD Make HEAD master
-rw-r--r--Makefile17
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index dcf9d85..b8542f9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
 DESTDIR ?= /usr/local
-
-CFLAGS.tr2cyr += -DEXEC
+RM ?= rm -f
 
 OBJS += tr2cyr.o
 OBJS.tr2cyr += tr2cyr_exec.o
@@ -8,18 +7,16 @@ OBJS.tr2cyr += tr2cyr_exec.o
 
 all: tr2cyr libtr2cyr.a libtr2cyr.so
 
-tr2cyr libtr2cyr.a libtr2cyr.so: ${OBJS}
-tr2cyr: ${OBJS.tr2cyr}
-
 tr2cyr.c tr2cyr_exec.c: tr2cyr.h
 
-.SUFFIXES: .o .a
-libtr2cyr.a:
+tr2cyr: tr2cyr.o tr2cyr_exec.o
+	${CC} -o tr2cyr ${LDFLAGS} ${LDLIBS} ${OBJS} ${OBJS.tr2cyr}
+
+libtr2cyr.a: ${OBJS}
 	${AR} rcs libtr2cyr.a ${OBJS}
 
-.SUFFIXES: .o .so
-libtr2cyr.so:
-	${LD} -shared -o libtr2cyr.so ${LDFLAGS} ${LDLIBS} ${OBJS}
+libtr2cyr.so: ${OBJS}
+	${CC} -shared -o libtr2cyr.so ${LDFLAGS} ${LDLIBS} ${OBJS}
 
 README: README.7
 	mandoc -Tascii $< | col -b > $@