-
Notifications
You must be signed in to change notification settings - Fork 732
Expand file tree
/
Copy pathmakefile
More file actions
28 lines (25 loc) · 762 Bytes
/
makefile
File metadata and controls
28 lines (25 loc) · 762 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
ifeq ($(OS),Windows_NT)
EXT=.exe
PLATFORM_OPTS=-static
PLATFORM_LD_OPTS=-pthread -Wl,--no-as-needed
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
EXT=
PLATFORM_OPTS=
PLATFORM_LD_OPTS=-pthread
else ifeq ($(UNAME_S),Haiku)
EXT=
PLATFORM_OPTS=
PLATFORM_LD_OPTS=-Wl,--no-as-needed
else
EXT=
PLATFORM_OPTS=
PLATFORM_LD_OPTS=-pthread -lrt -Wl,--no-as-needed
endif
endif
default: stabtest$(EXT)
stabtest$(EXT): stabtest.cpp ../../readerwriterqueue.h ../../atomicops.h ../common/simplethread.h ../common/simplethread.cpp makefile
g++ $(PLATFORM_OPTS) -std=c++11 -Wsign-conversion -Wpedantic -Wall -DNDEBUG -O3 stabtest.cpp ../common/simplethread.cpp -o stabtest$(EXT) $(PLATFORM_LD_OPTS)
run: stabtest$(EXT)
./stabtest$(EXT)