56c0bc3c13bddb9c23635708908df3973c3cfe0a
[platform/upstream/libatomic_ops.git] / src / Makefile.msft
1 #
2 # Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
3 #
4 # The really trivial win32/VC++ Makefile.  Note that atomic_ops.c defines
5 # only AO_pause (used by atomic_ops_stack).
6 # And we rely on a pre-built test_atomic_include.h and generalize-small.h,
7 # since we can't rely on sed.  But we don't keep test_atomic_include.h in
8 # the development repository any longer, so if you want to do "make check"
9 # for the sources obtained from the repository then
10 # do "autoreconf -vif; ./configure; make check" in Cygwin first.
11 # Win32 clients only need to include the header files.
12 # To install, copy atomic_ops.h and the atomic_ops/... tree to your favorite
13 # include directory.
14
15 #MY_CPU=X86
16 #CPU=$(MY_CPU)
17 #!include <ntwin32.mak>
18
19 CFLAGS=-O2 -W3 -DAO_ASSUME_WINDOWS98
20
21 LIB_OBJS=atomic_ops.obj atomic_ops_malloc.obj atomic_ops_stack.obj
22
23 all: libatomic_ops_gpl.lib
24
25 atomic_ops.obj:
26         cl $(CFLAGS) -c atomic_ops.c
27
28 atomic_ops_stack.obj:
29         cl $(CFLAGS) -c atomic_ops_stack.c
30
31 atomic_ops_malloc.obj:
32         cl $(CFLAGS) -c atomic_ops_malloc.c
33
34 libatomic_ops_gpl.lib: $(LIB_OBJS)
35         lib /out:libatomic_ops_gpl.lib $(LIB_OBJS)
36
37 test_atomic: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
38         cl $(CFLAGS) -I. ..\tests\test_atomic.c /Fo.\test_atomic
39
40 test_atomic_w95: ..\tests\test_atomic.c ..\tests\test_atomic_include.h
41         cl -W3 -O2 -I. ..\tests\test_atomic.c /Fo.\test_atomic_w95
42
43 test_malloc: ..\tests\test_malloc.c libatomic_ops_gpl.lib
44         cl $(CFLAGS) -I. ..\tests\test_malloc.c /Fo.\test_malloc \
45             libatomic_ops_gpl.lib
46
47 test_stack: ..\tests\test_stack.c libatomic_ops_gpl.lib
48         cl $(CFLAGS) -I. ..\tests\test_stack.c /Fo.\test_stack \
49             libatomic_ops_gpl.lib
50
51 check: test_atomic test_atomic_w95 test_malloc test_stack
52         @echo "The following will print lots of 'Missing ...' messages"
53         test_atomic_w95
54         @echo "The following will print some 'Missing ...' messages"
55         test_atomic
56         test_malloc
57         test_stack
58
59 clean:
60         del *.exe *.obj libatomic_ops_gpl.lib