win-pvdrivers

annotate liblfds.6/makefile.windows @ 1086:3d4d85c41fc6

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