-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (34 loc) · 1.04 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
CXX= g++
LD = g++
SRCDIR = ./src
BINDIR = ./bin
TMPDIR = ./tmp
INCDIR = ./include
INC = -I./include
PREFIX=/home/strait
CXXFLAGS = -O2 -Wunused -Wall -Wextra -Wshadow $(INC)
LDFLAGS = -pthread
SOFLAGS = -shared
LIBS += -L$(PREFIX)/lib
MAIN=EventBuilder.cxx
TARGET=$(MAIN:%.cxx=$(BINDIR)/%)
all: dir $(TARGET)
#------------------------------------------------------------------------------
USBSTREAMO = $(TMPDIR)/USBstream.o
USBSTREAMUTILSO = $(TMPDIR)/USBstreamUtils.o
EVENTBUILDERO = $(TMPDIR)/EventBuilder.o
OBJS = $(USBSTREAMO) $(USBSTREAMUTILSO) $(EVENTBUILDERO)
#------------------------------------------------------------------------------
.SUFFIXES: .cxx .o .so
all: dir $(TARGET)
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
@echo "$@ done"
clean:
@rm -rf $(BINDIR) $(TMPDIR) core $(SRCDIR)/*Dict*
$(TMPDIR)/%.o: $(SRCDIR)/%.cxx \
$(INCDIR)/USBstream.h \
$(INCDIR)/USBstreamUtils.h
$(CXX) $(CXXFLAGS) -c $< -o $@
dir:
@mkdir -p $(BINDIR) $(TMPDIR)