pthread_pause pthread_unpause
[mirrors/Programs.git] / c / pthread_extra / Makefile
1 COPT=-O2 -flto -ftree-vectorize -ftree-slp-vectorize -fvisibility=hidden -D_FORTIFY_SOURCE=2 -DMG_ENABLE_FS=0 -fstack-protector-strong -fno-delete-null-pointer-checks $(CARCH)
2 #COPT=-fvisibility=hidden -DMG_ENABLE_FS=0 -fstack-protector-strong $(CARCH)
3 CDEF=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE=1 -D_GNU_SOURCE
4 CERR=-Wall -Wextra -Werror -pedantic -Werror=date-time -Wformat-security -Wduplicated-cond -Wfloat-equal -Wshadow -Wlogical-not-parentheses -Wnull-dereference
5
6 CLIB:= -pthread -I .
7 LIB:= -pthread
8
9 CFLAGS+=$(COPT) $(CERR) -Wjump-misses-init $(CDEF) -std=c11 $(CLIB)
10 CXXFLAGS+=$(COPT) $(CERR) $(CDEF) -std=c++11 $(CLIB)
11 LDFLAGS+=$(COPT) $(LIB)
12
13 BIN=test
14 OBJ=pthread_pause.o pthread_multi.o pthread_msgqueue.o test.o
15
16 all: $(BIN)
17 $(BIN): $(OBJ)
18 $(CXX) -o $(BIN) $(OBJ) $(LDFLAGS)
19 strip --strip-unneeded $(BIN)
20
21 gcc -lpthread -I . test_pause.c pthread_pause.o -o test_pause
22
23 clean:
24 rm -f $(BIN) $(OBJ) $(DEPS)
25
26 DEPS:=$(OBJ:.o=.d)
27 -include $(DEPS)
28
29 .c.o:
30 $(CC) -c $(CFLAGS) -MD -o $@ $<
31
32 .cpp.o:
33 $(CXX) -c $(CXXFLAGS) -MD -o $@ $<
34
This page took 0.233801 seconds and 4 git commands to generate.