blob: 56968e58775e01fd7b743466e1814a52c53cbce9 (
plain)
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
|
# Makefile for the pthreads test suite.
# If all of the .pass files can be created, the test suite has passed.
CP = copy
RM = erase
TOUCH = echo Passed >
#
# Mingw32
#
CC = gcc
CFLAGS = -g -O2 -UNDEBUG -Wall -o $@ $^
BUILD_DIR = ../build
RELEASE_DIR = ../release
INCLUDES = -I$(BUILD_DIR)/include
LIBS = $(BUILD_DIR)/lib/libpthread32.a
##
## MSVC
##
#CC = cl
#CFLAGS = /W3 /MT /nologo /Yd /Zi /Fe$@ $^
#BUILD_DIR = ..\build
#RELEASE_DIR = ..\release
#INCLUDES = -I$(BUILD_DIR)\include
#LIBS = $(BUILD_DIR)\lib\pthread.lib
DLL = pthread.dll
# If a test case returns a non-zero exit code to the shell, make will
# stop.
TESTS = count1 create1 equal1 exit1 exit2 \
exit3 eyal1 mutex1 mutex2 mutex3 \
once1 self1 self2 self3 tsd1
PASSES = $(TESTS:%=%.pass)
all: $(PASSES)
%.pass: %.exe $(DLL)
$*
$(TOUCH) $@
%.exe: %.c
$(CC) $(CFLAGS) $(INCLUDES) $(LIBS)
$(DLL):
$(CP) ..\build\bin\$@ .
clean:
- $(RM) *.exe
- $(RM) *.pass
|