# -*- Makefile -*- for libsigsegv #### Start of system configuration section. #### # Flags that can be set on the nmake command line: # MFLAGS={-ML|-MT|-MD} for defining the compilation model # MFLAGS=-ML (the default) Single-threaded, statically linked - libc.lib # MFLAGS=-MT Multi-threaded, statically linked - libcmt.lib # MFLAGS=-MD Multi-threaded, dynamically linked - msvcrt.lib # DEBUG=1 for compiling with debugging information # Note that nmake command line flags are automatically passed to subdirectory # Makefiles. Therefore we don't need to pass them explicitly to subdirectory # Makefiles, but the subdirectory Makefiles need to have the same defaults. # Building as a DLL not supported yet. DLL=0 !if !defined(DEBUG) DEBUG=0 !endif !if !defined(MFLAGS) !if !$(DLL) MFLAGS= !else MFLAGS=-MD !endif !endif !if $(DEBUG) OPTIMFLAGS = -Od -Z7 !else OPTIMFLAGS = -D_NDEBUG -O1 !endif # Directories used by "make": srcdir = . # Directories used by "make install": prefix = /usr/local local_prefix = /usr/local exec_prefix = $(prefix) libdir = $(exec_prefix)/lib includedir = $(prefix)/include # Programs used by "make": CC = cl CFLAGS = $(MFLAGS) $(OPTIMFLAGS) CPP = cl -E INCLUDES = -I. -I$(srcdir) AR = lib AR_FLAGS = /out: MV = ren CP = copy LN = copy RM = -del # Programs used by "make install": INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ #### End of system configuration section. #### SHELL = /bin/sh OBJECTS = handler.obj dispatcher.obj version.obj all : sigsegv.lib config.h : config.h.msvc $(CP) $(srcdir)\config.h.msvc config.h sigsegv.h : src/sigsegv.h.msvc $(CP) $(srcdir)\src\sigsegv.h.msvc sigsegv.h handler.obj : $(srcdir)/src/handler.c $(srcdir)/src/handler-win32.c sigsegv.h config.h $(CC) $(CFLAGS) $(INCLUDES) -c $(srcdir)/src/handler.c dispatcher.obj : $(srcdir)/src/dispatcher.c sigsegv.h config.h $(CC) $(CFLAGS) $(INCLUDES) -c $(srcdir)/src/dispatcher.c version.obj : $(srcdir)/src/version.c sigsegv.h $(CC) $(CFLAGS) $(INCLUDES) -c $(srcdir)/src/version.c !if !$(DLL) sigsegv.lib : $(OBJECTS) $(RM) sigsegv.lib $(AR) $(AR_FLAGS)sigsegv.lib $(OBJECTS) !else # sigsegv.dll and sigsegv.lib are created together. sigsegv.lib : $(OBJECTS) $(CC) $(MFLAGS) -LD $(OBJECTS) -Fesigsegv.dll !endif sigsegv1.exe : $(srcdir)/tests/sigsegv1.c sigsegv.h sigsegv.lib $(CC) $(CFLAGS) $(INCLUDES) $(srcdir)/tests/sigsegv1.c sigsegv.lib /Fesigsegv1 sigsegv2.exe : $(srcdir)/tests/sigsegv2.c sigsegv.h sigsegv.lib $(CC) $(CFLAGS) $(INCLUDES) $(srcdir)/tests/sigsegv2.c sigsegv.lib /Fesigsegv2 stackoverflow1.exe : $(srcdir)/tests/stackoverflow1.c sigsegv.h sigsegv.lib $(CC) $(CFLAGS) $(INCLUDES) $(srcdir)/tests/stackoverflow1.c sigsegv.lib /Festackoverflow1 stackoverflow2.exe : $(srcdir)/tests/stackoverflow2.c sigsegv.h sigsegv.lib $(CC) $(CFLAGS) $(INCLUDES) $(srcdir)/tests/stackoverflow2.c sigsegv.lib /Festackoverflow2 check : all sigsegv1.exe sigsegv2.exe stackoverflow1.exe stackoverflow2.exe sigsegv1.exe sigsegv2.exe stackoverflow1.exe stackoverflow2.exe mostlyclean : clean clean : force $(RM) sigsegv.h *.obj *.lib *.exp *.dll core $(RM) sigsegv1.exe sigsegv2.exe stackoverflow1.exe stackoverflow2.exe distclean : clean $(RM) config.status config.log config.cache Makefile config.h maintainer-clean : distclean force :