summaryrefslogtreecommitdiff
path: root/Makefile
blob: b5b10e505b56649c86d8ca76fa4c9d5beb462907 (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
56
57
58

# This makefile is compatible with MS nmake and can be used as a
# replacement for buildlib.bat. I've changed the target from an ordinary dll
# (/LD) to a debugging dll (/LDd).
# 
# The variables $DLLDEST and $LIBDEST hold the destination directories for the
# dll and the lib, respectively. Probably all that needs to change is $DEVROOT.

DEVROOT=e:

DLLDEST=$(DEVROOT)\dll
LIBDEST=$(DEVROOT)\lib

CLIB=/MD

OBJ=attr.obj \
	cancel.obj \
	cleanup.obj \
	condvar.obj \
	create.obj \
	dll.obj \
	errno.obj \
	exit.obj \
	fork.obj \
	global.obj \
	misc.obj \
	mutex.obj \
	private.obj \
	rwlock.obj \
	sched.obj \
	semaphore.obj \
	signal.obj \
	sync.obj \
	tsd.obj

all: pthread.dll

clean:
	del pthread.dll \
		pthread.lib \
		*.obj


install: all
	copy pthread.dll $(DLLDEST)
	copy pthread.lib $(LIBDEST)

pthread.dll: $(OBJ) pthread.def
	cl /LDd /Zi $(CLIB) $(OBJ) /Fepthread.dll pthread.def 

.c.obj::
	cl /W3 $(CLIB) /nologo /Yd /Zi /I. \
		/D_WIN32_WINNT=0x400 \
		/DSTDCALL=_stdcall \
		-c $<

$(OBJ):