-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (55 loc) · 1.51 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#############################################################################
# Makefile for building: BLuetooth_dev
# Project: intellipi
# Written by: Alex Joseph, josephvalex@gmail.com
#############################################################################
CC = gcc
LINK = $(CC)
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIE $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIE $(DEFINES)
LIBS = -lbluetooth
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = cp -f
COPY_DIR = cp -f -Rd
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
#########
####### Files
SOURCES = simplescan.c
OBJECTS = simplescan.o
TARGET = simplescan
first: all
####### Implicit rules
.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) -o "$@" "$<"
.cc.o:
$(CXX) -c $(CXXFLAGS) -o "$@" "$<"
.cxx.o:
$(CXX) -c $(CXXFLAGS) -o "$@" "$<"
.C.o:
$(CXX) -c $(CXXFLAGS) -o "$@" "$<"
.c.o:
$(CC) -c $(CFLAGS) -o "$@" "$<"
####### Build rules
all: Makefile $(TARGET)
$(TARGET): $(OBJECTS)
$(LINK) -o $(TARGET) $(OBJECTS) $(LIBS)
####### Compile
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
########
# remove object files and executable when user executes "make clean"
clean:
rm *.o $(TARGET)