blob: 034ed40c59f973fdcb57cb4d65849e6131510546 [file] [log] [blame]
Evgeny Zinovievd54f8252018-08-01 15:53:18 +03001##
2## Makefile for pmh7tool
3##
4## Copyright (C) 2018 Evgeny Zinoviev <me@ch1p.com>
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; version 2 of the License.
9##
10## This program is distributed in the hope that it will be useful,
11## but WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13## GNU General Public License for more details.
14##
15
16CC = gcc
Jacob Garber52f0e842019-07-19 12:27:27 -060017CFLAGS = -O2 -Wall -Wextra -Werror
Evgeny Zinovievd54f8252018-08-01 15:53:18 +030018PROGRAM = pmh7tool
Yegor Timoshenkoc2e49412018-10-07 01:58:27 +000019INSTALL = /usr/bin/env install
Evgeny Zinovievd54f8252018-08-01 15:53:18 +030020PREFIX = /usr/local
21
22all: $(PROGRAM)
23
24$(PROGRAM): pmh7tool.o
25 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
26
27install: $(PROGRAM)
28 $(INSTALL) $(PROGRAM) $(PREFIX)/sbin
29
30clean:
31 rm -f *.o $(PROGRAM)
32
33distclean: clean
34
35%.o: %.c
36 $(CC) $(CFLAGS) -c $^ -I. -o $@
37
38.PHONY: all install clean distclean