Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioping
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ioping
Commits
1762e25e
Commit
1762e25e
authored
Oct 24, 2015
by
Konstantin Khlebnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile: add test target
Signed-off-by:
Konstantin Khlebnikov
<
koct9i@gmail.com
>
parent
2ee2a331
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
Makefile
Makefile
+17
-11
No files found.
Makefile
View file @
1762e25e
...
@@ -6,7 +6,7 @@ MAN1DIR=$(PREFIX)/share/man/man1
...
@@ -6,7 +6,7 @@ MAN1DIR=$(PREFIX)/share/man/man1
SRCS
=
ioping.c
SRCS
=
ioping.c
OBJS
=
$(SRCS:.c=.o)
OBJS
=
$(SRCS:.c=.o)
BIN
S
=
ioping
BIN
ARY
=
ioping
MANS
=
ioping.1
MANS
=
ioping.1
MANS_F
=
$(MANS:.1=.txt)
$(MANS:.1=.pdf)
MANS_F
=
$(MANS:.1=.txt)
$(MANS:.1=.pdf)
DOCS
=
README.md LICENSE changelog
DOCS
=
README.md LICENSE changelog
...
@@ -17,7 +17,7 @@ EXTRA_VERSION:=$(shell test -d .git && git describe --tags --dirty=+ | sed 's/^v
...
@@ -17,7 +17,7 @@ EXTRA_VERSION:=$(shell test -d .git && git describe --tags --dirty=+ | sed 's/^v
VERSION
:=
$(
shell
sed
-ne
's/\# define VERSION \"\(.*\)\"/\1/p'
ioping.c
)
${EXTRA_VERSION}
VERSION
:=
$(
shell
sed
-ne
's/\# define VERSION \"\(.*\)\"/\1/p'
ioping.c
)
${EXTRA_VERSION}
DISTDIR
=
$(PACKAGE)
-
$(VERSION)
DISTDIR
=
$(PACKAGE)
-
$(VERSION)
DISTFILES
=
$(SRCS)
$(MANS)
$(DOCS)
$(SPEC)
Makefile
DISTFILES
=
$(SRCS)
$(MANS)
$(DOCS)
$(SPEC)
Makefile
PACKFILES
=
$(BIN
S
)
$(MANS)
$(MANS_F)
$(DOCS)
PACKFILES
=
$(BIN
ARY
)
$(MANS)
$(MANS_F)
$(DOCS)
STRIP
=
strip
STRIP
=
strip
TARGET
=
$(
shell
${CC}
-dumpmachine
|
cut
-d-
-f
2
)
TARGET
=
$(
shell
${CC}
-dumpmachine
|
cut
-d-
-f
2
)
...
@@ -26,23 +26,29 @@ ifdef MINGW
...
@@ -26,23 +26,29 @@ ifdef MINGW
CC
=
i686-w64-mingw32-gcc
CC
=
i686-w64-mingw32-gcc
STRIP
=
i686-w64-mingw32-strip
STRIP
=
i686-w64-mingw32-strip
TARGET
=
win32
TARGET
=
win32
BIN
S
:=
$(BINS
:=.exe)
BIN
ARY
:=
$(BINARY
:=.exe)
endif
endif
all
:
$(BIN
S
)
all
:
$(BIN
ARY
)
version
:
version
:
@
echo
${VERSION}
@
echo
${VERSION}
clean
:
clean
:
$(RM)
-f
$(OBJS)
$(BIN
S)
$(MANS_F)
$(RM)
-f
$(OBJS)
$(BIN
ARY)
$(MANS_F)
ioping.tmp
strip
:
$(BIN
S
)
strip
:
$(BIN
ARY
)
$(STRIP)
$^
$(STRIP)
$^
install
:
$(BINS) $(MANS)
test
:
$(BINARY)
./
$(BINARY)
-i
10ms
-c
3
-s
512
-S
16k
${PWD}
./
$(BINARY)
-w
10ms
-R
-k
-S
1m .
./
$(BINARY)
-w
10ms
-RL
ioping.tmp
rm
ioping.tmp
install
:
$(BINARY) $(MANS)
mkdir
-p
$(DESTDIR)$(BINDIR)
mkdir
-p
$(DESTDIR)$(BINDIR)
install
-s
-m
0755
$(BIN
S
)
$(DESTDIR)$(BINDIR)
install
-s
-m
0755
$(BIN
ARY
)
$(DESTDIR)$(BINDIR)
mkdir
-p
$(DESTDIR)$(MAN1DIR)
mkdir
-p
$(DESTDIR)$(MAN1DIR)
install
-m
644
$(MANS)
$(DESTDIR)$(MAN1DIR)
install
-m
644
$(MANS)
$(DESTDIR)$(MAN1DIR)
...
@@ -58,18 +64,18 @@ install: $(BINS) $(MANS)
...
@@ -58,18 +64,18 @@ install: $(BINS) $(MANS)
%.txt
:
%.1
%.txt
:
%.1
MANWIDTH
=
80 man ./
$<
| col
-b
>
$@
MANWIDTH
=
80 man ./
$<
| col
-b
>
$@
$(BIN
S
)
:
$(OBJS)
$(BIN
ARY
)
:
$(OBJS)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LDFLAGS)
$(LIBS)
$(CC)
-o
$@
$^
$(CFLAGS)
$(LDFLAGS)
$(LIBS)
dist
:
$(DISTFILES)
dist
:
$(DISTFILES)
tar
-cz
--transform
=
's,^,
$(DISTDIR)
/,S'
$^
-f
$(DISTDIR)
.tar.gz
tar
-cz
--transform
=
's,^,
$(DISTDIR)
/,S'
$^
-f
$(DISTDIR)
.tar.gz
binary-tgz
:
$(PACKFILES)
binary-tgz
:
$(PACKFILES)
${STRIP}
${BIN
S
}
${STRIP}
${BIN
ARY
}
tar
-cz
--transform
=
's,^,
$(DISTDIR)
/,S'
-f
${PACKAGE}
-
${VERSION}
-
${TARGET}
.tgz
$^
tar
-cz
--transform
=
's,^,
$(DISTDIR)
/,S'
-f
${PACKAGE}
-
${VERSION}
-
${TARGET}
.tgz
$^
binary-zip
:
$(PACKFILES)
binary-zip
:
$(PACKFILES)
${STRIP}
${BIN
S
}
${STRIP}
${BIN
ARY
}
ln
-s
.
$(DISTDIR)
ln
-s
.
$(DISTDIR)
zip
${PACKAGE}
-
${VERSION}
-
${TARGET}
.zip
$(
addprefix
$(DISTDIR)
/,
$^
)
zip
${PACKAGE}
-
${VERSION}
-
${TARGET}
.zip
$(
addprefix
$(DISTDIR)
/,
$^
)
rm
$(DISTDIR)
rm
$(DISTDIR)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment