-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 695 Bytes
/
Makefile
File metadata and controls
35 lines (24 loc) · 695 Bytes
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
CC ?= gcc
CXX ?= g++
CFLAGS = -O2 -g -Wall -std=c99
CXXFLAGS = -O2 -g -Wall -std=c++11 -DRDTSCP=1 #-DLIMITRATE=1
CXXOBJS = main pointer fifo
CFILES = $(addsuffix .c, $(COBJS) )
CXXFILES = $(addsuffix .cpp, $(CXXOBJS) )
OBJS = $(addsuffix .o, $(COBJS) ) $(addsuffix .o, $(CXXOBJS) )
ifneq ($(shell uname -s), Darwin)
RT = -lrt
STATIC = -static -static-libgcc -static-libstdc++
endif
INCS =
LIBS = -lpthread -lm -lc $(RT) $(STATIC)
compile: $(CXXFILES) $(CFILES)
$(MAKE) $(OBJS)
$(CXX) $(CXXFLAGS) $(INCS) $(OBJS) $(LIBS) -o ringb
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(INCS) -o $@ $<
%.o: %.c
$(CC) -c $(CFLAGS) $(INCS) -o $@ $<
.PHONY: clean
clean:
rm -rf ringb $(OBJS)