File: Makefile

package info (click to toggle)
bittwist 2.0-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 500 kB
  • sloc: ansic: 2,338; makefile: 34
file content (41 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SHELL = /bin/sh

prefix = $(DESTDIR)/usr
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
mandir = ${prefix}/share/man/man1

CC ?= gcc
DEBUG = -g
CFLAGS ?= -O2
CFLAGS += $(DEBUG)

SRC = src
DOC = doc

INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644

all: bittwist bittwiste

bittwist:
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(SRC)/bittwist.c -o $(SRC)/bittwist -I/usr/local/include -L/usr/local/lib -lpcap

bittwiste:
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(SRC)/bittwiste.c -o $(SRC)/bittwiste -I/usr/local/include -L/usr/local/lib -lpcap

clean:
	rm -f $(SRC)/bittwist $(SRC)/bittwiste

install:
	mkdir -p $(bindir)
	chmod 755 $(bindir)
	$(INSTALL_PROGRAM) $(SRC)/bittwist $(SRC)/bittwiste $(bindir)
	mkdir -p $(mandir)
	chmod 755 $(mandir)
	$(INSTALL_DATA) $(DOC)/bittwist.1 $(DOC)/bittwiste.1 $(mandir)

uninstall:
	rm -f $(bindir)/bittwist $(bindir)/bittwiste
	rm -f $(mandir)/bittwist.1 $(mandir)/bittwiste.1