-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (26 loc) · 1006 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
EXECUTABLE=ap-scanner
DEFINES=
INCLUDES=
CPP=g++
GCC=gcc
CXXFLAGS=-std=c++14 -g -Wall -Wfloat-conversion -Wno-switch `pkg-config --cflags libnl-genl-3.0`
CFLAGS=-Wall -g -Wfloat-conversion -Wpedantic -Wno-switch `pkg-config --cflags libnl-genl-3.0`
LDFLAGS += `pkg-config --libs libnl-genl-3.0`
#CXXFLAGS=-std=c++14 -fsanitize=address -Wall -Wfloat-conversion -Wno-switch `pkg-config --cflags libnl-genl-3.0`
#CFLAGS=-Wall -fsanitize=address -Wfloat-conversion -Wpedantic -Wno-switch `pkg-config --cflags libnl-genl-3.0`
#LDFLAGS += `pkg-config --libs libnl-genl-3.0` -fsanitize=address
SOURCES_CXX=./main.cpp
SOURCES_C=
OBJECTS_CXX=$(SOURCES_CXX:.cpp=.o)
OBJECTS_C=$(SOURCES_C:.c=.o)
.PHONY: clean
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS_CXX) $(OBJECTS_C)
$(CPP) -o $(EXECUTABLE) $(OBJECTS_CXX) $(OBJECTS_C) $(LDFLAGS)
%.o: %.cpp
$(CPP) $(INCLUDES) $(DEFINES) $(CXXFLAGS) -c -o $@ $<
%.o: %.c
$(GCC) $(INCLUDES) $(DEFINES) $(CFLAGS) -c -o $@ $<
clean:
rm -f ./*.o
rm -f ./ap-scanner