-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (31 loc) · 883 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
# This Makefile is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# Authors: Felipe Ortiz
# Version: 0.9
CXX=g++ -std=c++11
INCLUDES=-Iinclude
CXXOPTS=-Wall -g -O2
CXXFLAGS=$(CXXOPTS) $(INCLUDES)
LDFLAGS=
LDLIBS=-liw
# Where .a file must be created
LIB=lib/libwifi.a
default: all
# Object files
OBJS=src/wifi.o
all: lib $(LIB)
lib:
mkdir lib
$(LIB): $(LIB)($(OBJS))
clean:
rm -f lib/*.a src/*.o
%.d: %.cc
$(CXX) -MM -MP -MF $@ -MT "$(@:.d=.o) $@" $(INCLUDES) $<
ifneq "$(MAKECMDGOALS)" "clean"
-include $(OBJS:.o=.d)
endif