Commit 1cdf14d2 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov

Fix i386 RPM build on an x86_64

Makefile:
* append CFLAGS, do not set
* use CFLAGS when linking (for -m32 etc)
ioping.spec:
* pass RPM_OPT_FLAGS to make in environment

While at it, also:
* Makefile: move compiler/linker options before file names
* Makefile: move -lm to where it belongs (LDFLAGS)
Signed-off-by: default avatarKir Kolyshkin <kir@openvz.org>
parent d3200fd3
CFLAGS=-std=c99 -g -Wall -Wextra -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
LDFLAGS=
CFLAGS+=-std=c99 -g -Wall -Wextra -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
LDFLAGS=-lm
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MAN1DIR=$(PREFIX)/share/man/man1
......@@ -27,10 +27,10 @@ install: $(BINS) $(MANS)
install -m 644 $(MANS) $(DESTDIR)$(MAN1DIR)
%.o: %.c
$(CC) -c -o $@ $^ ${CFLAGS}
$(CC) $(CFLAGS) -c -o $@ $^
ioping: $(OBJS)
$(CC) -o $@ $^ -lm ${LDFLAGS}
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
dist:
tar -cz --transform='s,^,$(DISTDIR)/,S' $(DISTFILES) -f $(DISTDIR).tar.gz
......
......@@ -20,7 +20,7 @@ similar to how ping(1) does for network latency.
%build
make %{?_smp_mflags}
CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags}
%install
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment