about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-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 > $@