-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (38 loc) · 1.13 KB
/
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
# **************************************************************
# * Project: DNS Export
# * File: Makefile
# * Author: Šimon Stupinský
# * University: Brno University of Technology
# * Faculty: Faculty of Information Technology
# * Course: Network Applications and Network Administration
# * Date: 28.09.2018
# * Last change: 16.11.2018
# *
# * Subscribe: Makefile
# *
# **************************************************************/
# Usage:
# $ make # Compile project
# $ make debug # Compile project with debug purpose
# $ make clean # Remove object files and deplist
# $ make clean-all # Remove object files, deplist and binaries
APP = dns-export
CXX = g++
RM = rm -f
CPPFLAGS = -g -std=c++11 -Wall -Wextra -Wpedantic
LDLIBS= -lpcap
SRCS = $(wildcard *.cpp)
OBJS = $(subst .cpp,.o,$(SRCS))
all: $(APP)
cd: all clean clean-all
$(APP): $(OBJS)
$(CXX) -o $(APP) $(OBJS) $(LDLIBS)
depend: .depend
.depend: $(SRCS)
$(RM) ./.depend 2>/dev/null
$(CXX) $(CPPFLAGS) -MM $^ >> ./.depend 2>/dev/null
clean:
$(RM) $(OBJS)
clean-all:
$(RM) $(OBJS) $(APP)
include .depend