aports/community/mingetty/fix-makefile.patch
2021-09-11 19:19:54 +02:00

28 lines
602 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,20 @@
DESTDIR=
CC=gcc
-CFLAGS=-O2 -Wall -W -pipe -D_GNU_SOURCE
+CFLAGS_ALL=$(CFLAGS) -Wall -W -pipe -D_GNU_SOURCE
MANDIR=/usr/share/man/man8
SBINDIR=/sbin
all: mingetty
install: all
- install -m 0755 mingetty $(DESTDIR)$(SBINDIR)
- install -m 0644 mingetty.8 $(DESTDIR)$(MANDIR)
+ install -D -m 0755 mingetty -t $(DESTDIR)$(SBINDIR)
+ install -D -m 0644 mingetty.8 -t $(DESTDIR)$(MANDIR)
mingetty: mingetty.o
+ $(CC) $(CFLAGS_ALL) $(LDFLAGS) -o $@ $< $(LDLIBS)
+%.o: %.c
+ $(CC) $(CFLAGS_ALL) -c -o $@ $<
+
clean:
rm -f *.o mingetty
-