win-pvdrivers

view liblfds.6/test/makefile.windows @ 1025:aa2e51f67f7c

Fix hibernate under Win8. Change debugprints.
author James Harper <james.harper@bendigoit.com.au>
date Tue Feb 19 15:14:53 2013 +1100 (2013-02-19)
parents 6300617040e0
children
line source
1 ##### paths #####
2 BINDIR = bin
3 INCDIR = ../inc
4 LIBDIR = ../bin
5 OBJDIR = obj
6 SRCDIR = src
8 ##### misc #####
9 QUIETLY = 1>nul 2>nul
11 ##### sources, objects and libraries #####
12 BINNAME = test
13 BINARY = $(BINDIR)\$(BINNAME).exe
14 SRCDIRS = .
15 SOURCES = abstraction_cpu_count.c test_abstraction.c abstraction_thread_start.c abstraction_thread_wait.c benchmark_freelist.c benchmark_queue.c benchmark_ringbuffer.c benchmark_stack.c test_freelist.c main.c misc.c test_queue.c test_ringbuffer.c test_slist.c test_stack.c
16 OBJECTS = $(patsubst %.c,$(OBJDIR)/%.obj,$(notdir $(SOURCES)))
17 SYSLIBS = kernel32.lib
18 USRLIBS = liblfds.lib
20 ##### tools #####
21 MAKE = make
22 MFLAGS =
24 CC = cl
25 CFBASE = /nologo /W4 /WX /c "-I$(SRCDIR)" "-I$(INCLUDE)" "-I$(INCDIR)" "/Fd$(BINDIR)\$(BINNAME).pdb" /D UNICODE /D _UNICODE /DWIN32_LEAN_AND_MEAN /D_CRT_SECURE_NO_WARNINGS
26 CFREL = /Ox /DNDEBUG /MT
27 CFDBG = /Od /Gm /Zi /D_DEBUG /MTd
29 LD = link
30 LFBASE = "/libpath:$(LIB)" "/libpath:$(LIBDIR)" /nologo /subsystem:console /nodefaultlib /nxcompat /wx
31 LFREL = /incremental:no
32 LFDBG = /debug "/pdb:$(BINDIR)\$(BINNAME).pdb"
34 ##### variants #####
35 CFLAGS = $(CFBASE) $(CFDBG)
36 LFLAGS = $(LFBASE) $(LFDBG)
37 CLIB = libcmtd.lib
39 ifeq ($(MAKECMDGOALS),rel)
40 CFLAGS = $(CFBASE) $(CFREL)
41 LFLAGS = $(LFBASE) $(LFREL)
42 CLIB = libcmt.lib
43 endif
45 ##### search paths #####
46 vpath %.c $(patsubst %,$(SRCDIR)/%;,$(SRCDIRS))
48 ##### implicit rules #####
49 $(OBJDIR)/%.obj : %.c
50 $(CC) $(CFLAGS) "/Fo$@" $<
52 ##### explicit rules #####
53 $(BINARY) : $(OBJECTS)
54 $(LD) $(LFLAGS) $(CLIB) $(SYSLIBS) $(USRLIBS) $(OBJECTS) /out:$(BINARY)
56 ##### phony #####
57 .PHONY : clean rel dbg
59 clean :
60 @erase /Q $(OBJDIR)\*.obj $(BINDIR)\$(BINNAME).* $(QUIETLY)
62 rel : $(BINARY)
63 dbg : $(BINARY)