forked from ZerBea/hcxdumptool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (48 loc) · 1016 Bytes
/
Makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
PREFIX ?=/usr/local
INSTALLDIR = $(DESTDIR)$(PREFIX)/bin
HOSTOS := $(shell uname -s)
GPIOSUPPORT=off
CC ?= gcc
CFLAGS ?= -O3 -Wall -Wextra
CFLAGS += -std=gnu99
INSTFLAGS = -m 0755
ifeq ($(HOSTOS), Linux)
INSTFLAGS += -D
endif
all: build
build:
ifeq ($(HOSTOS), Linux)
$(CC) $(CFLAGS) $(CPPFLAGS) -o hcxpioff hcxpioff.c $(LDFLAGS)
$(CC) $(CFLAGS) $(CPPFLAGS) -o hcxdumptool hcxdumptool.c $(LDFLAGS) -lcrypto
else
$(info OS not supported)
endif
install: build
ifeq ($(HOSTOS), Linux)
install $(INSTFLAGS) hcxpioff $(INSTALLDIR)/hcxpioff
install $(INSTFLAGS) hcxdumptool $(INSTALLDIR)/hcxdumptool
else
$(info OS not supported)
endif
ifeq ($(HOSTOS), Linux)
rm -f hcxpioff
rm -f hcxdumptool
else
$(info OS not supported)
endif
rm -f *.o *~
clean:
ifeq ($(HOSTOS), Linux)
rm -f hcxpioff
rm -f hcxdumptool
else
$(info OS not supported)
endif
rm -f *.o *~
uninstall:
ifeq ($(HOSTOS), Linux)
rm -f $(INSTALLDIR)/hcxpioff
rm -f $(INSTALLDIR)/hcxdumptool
else
$(info OS not supported)
endif