3 INCDIR = ../liblfds611/inc
\r
4 LIBDIR = ../liblfds611/bin
\r
9 QUIETLY = 1>nul 2>nul
\r
11 ##### sources, objects and libraries #####
\r
13 BINARY = $(BINDIR)\$(BINNAME).exe
\r
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
\r
16 OBJECTS = $(patsubst %.c,$(OBJDIR)/%.obj,$(notdir $(SOURCES)))
\r
17 SYSLIBS = kernel32.lib
\r
18 USRLIBS = liblfds611.lib
\r
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
\r
26 CFREL = /Ox /DNDEBUG /MT
\r
27 CFDBG = /Od /Gm /Zi /D_DEBUG /MTd
\r
30 LFBASE = "/libpath:$(LIB)" "/libpath:$(LIBDIR)" /nologo /subsystem:console /nodefaultlib /nxcompat /wx
\r
31 LFREL = /incremental:no
\r
32 LFDBG = /debug "/pdb:$(BINDIR)\$(BINNAME).pdb"
\r
34 ##### variants #####
\r
35 CFLAGS = $(CFBASE) $(CFDBG)
\r
36 LFLAGS = $(LFBASE) $(LFDBG)
\r
39 ifeq ($(MAKECMDGOALS),rel)
\r
40 CFLAGS = $(CFBASE) $(CFREL)
\r
41 LFLAGS = $(LFBASE) $(LFREL)
\r
45 ##### search paths #####
\r
46 vpath %.c $(patsubst %,$(SRCDIR)/%;,$(SRCDIRS))
\r
48 ##### implicit rules #####
\r
49 $(OBJDIR)/%.obj : %.c
\r
50 $(CC) $(CFLAGS) "/Fo$@" $<
\r
52 ##### explicit rules #####
\r
53 $(BINARY) : $(OBJECTS)
\r
54 $(LD) $(LFLAGS) $(CLIB) $(SYSLIBS) $(USRLIBS) $(OBJECTS) /out:$(BINARY)
\r
57 .PHONY : clean rel dbg
\r
60 @erase /Q $(OBJDIR)\*.obj $(BINDIR)\$(BINNAME).* $(QUIETLY)
\r