# # Makefile for Microsoft C compilers. Tested against Visual C++ 6.0. # Not pretty but it seems to work. # # Run with "nmake /f Makefile.msc". Expects NufxLib to have been built # in "..\nufxlib-$(VERSION)". # # To build without debugging info, use "nmake nodebug=1". # # Windows magic TARGETOS = BOTH !include VERSION=100 NUFXSRCDIR = ..\nufxlib-$(VERSION) # object files OBJS1 = Add.obj ArcUtils.obj Delete.obj Extract.obj Filename.obj List.obj OBJS2 = Main.obj MiscStuff.obj MiscUtils.obj State.obj SysUtils.obj OBJS = $(OBJS1) $(OBJS2) !ifdef NODEBUG #OPT = $(cdebug) /D NDEBUG /ML OPT = $(cdebug) /ML LIB_FLAGS = /nodefaultlib:libcd.lib /nologo libc.lib setargv.obj !else OPT = $(cdebug) /MLd LIB_FLAGS = /nodefaultlib:libc.lib /nologo libcd.lib setargv.obj !endif BUILD_FLAGS = /W3 /GX /D "WIN32" /D "_CONSOLE" /I "$(NUFXSRCDIR)" # how to compile sources .c.obj: @$(cc) $(cdebug) $(OPT) $(BUILD_FLAGS) $(cflags) $(cvars) -o $@ $< PRODUCT = nulib2.exe all: $(PRODUCT) nulib2.exe: $(OBJS) $(NUFXSRCDIR)\nufxlib.lib $(link) $(ldebug) $** -out:$@ $(NUFXSRCDIR)\nufxlib.lib $(LIB_FLAGS) clean: del *.obj del $(PRODUCT) Add.obj: Add.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h ArcUtils.obj: ArcUtils.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h Delete.obj: Delete.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h Extract.obj: Extract.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h Filename.obj: Filename.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h List.obj: List.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h Main.obj: Main.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h MiscStuff.obj: MiscStuff.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h MiscUtils.obj: MiscUtils.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h State.obj: State.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h SysUtils.obj: SysUtils.c NuLib2.h $(NUFXSRCDIR)\NufxLib.h SysDefs.h State.h MiscStuff.h