win-pvdrivers

view liblfds.6/makefile.windows @ 1075:5e8aeb18279c

Add export methods to retrieve and set the hypercall stubs for the dump_xenpci driver
author James Harper <james.harper@bendigoit.com.au>
date Mon Dec 09 13:30:14 2013 +1100 (2013-12-09)
parents 6300617040e0
children
line source
1 ##### paths #####
2 BINDIR = bin
3 INCDIR = inc
4 OBJDIR = obj
5 SRCDIR = src
7 ##### misc #####
8 QUIETLY = 1>nul 2>nul
10 ##### sources, objects and libraries #####
11 BINNAME = liblfds
12 LIB_BINARY = $(BINDIR)\$(BINNAME).lib
13 DLL_BINARY = $(BINDIR)\$(BINNAME).dll
14 SRCDIRS = abstraction freelist queue ringbuffer slist stack
15 SOURCES = abstraction_aligned_free.c abstraction_aligned_malloc.c abstraction_cas.c abstraction_dcas.c abstraction_increment.c \
16 freelist_delete.c freelist_get_and_set.c freelist_new.c freelist_query.c freelist_pop_push.c \
17 queue_delete.c queue_new.c queue_query.c queue_queue.c \
18 ringbuffer_delete.c ringbuffer_get_and_put.c ringbuffer_new.c ringbuffer_query.c \
19 slist_delete.c slist_get_and_set.c slist_link.c slist_new.c \
20 stack_delete.c stack_new.c stack_push_pop.c stack_query.c
21 OBJECTS = $(patsubst %.c,$(OBJDIR)/%.obj,$(notdir $(SOURCES)))
23 ##### tools #####
24 MAKE = make
25 MFLAGS =
27 CC = cl
28 CBASE = /nologo /W4 /WX /c "-I$(SRCDIR)" "-I$(INCDIR)" "/Fd$(BINDIR)\$(BINNAME).pdb" /DUNICODE /D_UNICODE /DWIN32_LEAN_AND_MEAN
29 CFREL = /Ox /DNDEBUG
30 CFDBG = /Od /Gm /Zi /D_DEBUG
32 AR = lib
33 AFLAGS = /nologo /subsystem:console /wx /verbose
35 LD = link
36 LFBASE = /dll /def:$(BINNAME).def /nologo /subsystem:console /wx /nodefaultlib /nxcompat
37 LFREL = /incremental:no
38 LFDBG = /debug "/pdb:$(BINDIR)\$(BINNAME).pdb"
40 ##### variants #####
41 CFLAGS = $(CBASE) $(CFDBG) /MTd
42 LFLAGS = $(LFBASE) $(LFDBG)
43 CLIB = libcmtd.lib
45 ifeq ($(MAKECMDGOALS),librel)
46 CFLAGS = $(CBASE) $(CFREL) /MT
47 LFLAGS = $(LFBASE) $(LFREL)
48 CLIB = libcmt.lib
49 endif
51 ifeq ($(MAKECMDGOALS),libdbg)
52 CFLAGS = $(CBASE) $(CFDBG) /MTd
53 LFLAGS = $(LFBASE) $(LFDBG)
54 CLIB = libcmtd.lib
55 endif
57 ifeq ($(MAKECMDGOALS),dllrel)
58 CFLAGS = $(CBASE) $(CFREL) /MD
59 LFLAGS = $(LFBASE) $(LFREL)
60 CLIB = msvcrt.lib
61 endif
63 ifeq ($(MAKECMDGOALS),dlldbg)
64 CFLAGS = $(CBASE) $(CFDBG) /MDd
65 LFLAGS = $(LFBASE) $(LFDBG)
66 CLIB = msvcrtd.lib
67 endif
69 ##### search paths #####
70 vpath %.c $(patsubst %,$(SRCDIR)/%;,$(SRCDIRS))
72 ##### implicit rules #####
73 $(OBJDIR)/%.obj : %.c
74 $(CC) $(CFLAGS) "/Fo$@" $<
76 ##### explicit rules #####
77 $(LIB_BINARY) : $(OBJECTS)
78 $(AR) $(AFLAGS) $(OBJECTS) /out:$(LIB_BINARY)
80 $(DLL_BINARY) : $(OBJECTS)
81 $(LD) $(LFLAGS) $(CLIB) $(OBJECTS) /out:$(DLL_BINARY)
83 ##### phony #####
84 .PHONY : clean librel libdbg dllrel dlldbg
86 clean :
87 @erase /Q $(BINDIR)\$(BINNAME).* $(OBJDIR)\*.obj $(QUIETLY)
89 librel : $(LIB_BINARY)
90 libdbg : $(LIB_BINARY)
92 dllrel : $(DLL_BINARY)
93 dlldbg : $(DLL_BINARY)