########################################################################### # # Norway standard makefile for: display # Copyright (c) 1995 - Wang Labratories # ########################################################################### NAME = OiDis400 TARGET = $(NAME).dll ########################################################################### # # Include wang.mak to get common code. # ########################################################################### !INCLUDE ..\include\wang.mak ########################################################################### # # Set up standard targets. The default target builds the target for this # module (a .dll, .ocx, etc). The other targets are used by the system # build procedures. # ########################################################################### all: mktmpdirs $(OBJDIRSL)$(NAME).DLL lib: mktmpdirs $(OBJDIRSL)$(NAME).lib bin: mktmpdirs $(OBJDIRSL)$(NAME).dll installlib: lib copy $(OBJDIRSL)$(NAME).lib $(INSTALLLIB) copy $(OBJDIRSL)$(NAME).exp $(INSTALLLIB) installbin: bin copy $(OBJDIRSL)$(NAME).dll $(INSTALLLIB) !IF "$(RELBLD)" == "" copy $(OBJDIRSL)$(NAME).pdb $(INSTALLLIB) !ENDIF cleanall: -del $(OBJDIRSL)*.obj -del $(OBJDIRSL)*.lib -del $(OBJDIRSL)*.dll -del $(OBJDIRSL)*.pch -del $(OBJDIRSL)*.res -del $(OBJDIRSL)*.exp -del $(OBJDIRSL)*.map -del $(OBJDIRSL)*.ilk -del $(OBJDIRSL)*.pdb mktmpdirs: !IF "$(MS_BUILD)" != "" -mkdir $(OBJDIR) -mkdir $(INSTALLLIB) !ENDIF ########################################################################### # # File Definitions: All relevant files are listed here. # ########################################################################### OBJ_NO_PCH = $(OBJDIRSL)libmain.obj OBJ_MAKE_PCH = $(OBJDIRSL)clear.obj OBJ_USE_PCH = $(OBJDIRSL)anbitmap.obj \ $(OBJDIRSL)annot.obj \ $(OBJDIRSL)antext.obj \ $(OBJDIRSL)assoc.obj \ $(OBJDIRSL)bright.obj \ $(OBJDIRSL)cache.obj \ $(OBJDIRSL)ccitt.obj \ $(OBJDIRSL)convert.obj \ $(OBJDIRSL)copy.obj \ $(OBJDIRSL)disp.obj \ $(OBJDIRSL)export32.obj \ $(OBJDIRSL)getparm.obj \ $(OBJDIRSL)linetorl.obj \ $(OBJDIRSL)memory.obj \ $(OBJDIRSL)merge.obj \ $(OBJDIRSL)oilog.obj \ $(OBJDIRSL)open.obj \ $(OBJDIRSL)orient.obj \ $(OBJDIRSL)privprt.obj \ $(OBJDIRSL)read.obj \ $(OBJDIRSL)repaint.obj \ $(OBJDIRSL)save.obj \ $(OBJDIRSL)scale.obj \ $(OBJDIRSL)scalebit.obj \ $(OBJDIRSL)scbwdec.obj \ $(OBJDIRSL)scroll.obj \ $(OBJDIRSL)seek.obj \ $(OBJDIRSL)setparm.obj \ $(OBJDIRSL)startop.obj \ $(OBJDIRSL)undo.obj \ $(OBJDIRSL)write.obj OBJ_FILES = $(OBJ_NO_PCH) $(OBJ_MAKE_PCH) $(OBJ_USE_PCH) RES_FILES = $(OBJDIRSL)$(NAME).res PCH_BASE = privdisp.h PCH_FILE = $(OBJDIRSL)privdisp.pch HDRS = $(PCH_BASE) \ $(I)\abridge.h \ $(I)\oiver.h \ $(I)\engdisp.h \ $(I)\eventlog.h \ $(I)\oiadm.h \ $(I)\oidisp.h \ $(I)\oierror.h \ $(I)\oifile.h \ $(I)\privapis.h SYSTEM_LIBS = $(SYSTEM_LIBS_DOR) \ user32.lib \ gdi32.lib \ kernel32.lib \ version.lib \ oldnames.lib OUR_LIBS_DEP = $(L)\oifil400.lib \ $(L)\oiadm400.lib OUR_LIBS = oifil400.lib \ oiadm400.lib LIBS = $(SYSTEM_LIBS) $(OUR_LIBS) ########################################################################### # # Flags which differ for debugging vs. release builds. In all cases, # we use the standard macro name, suffixed by _DOR (Debug Or Release). # ########################################################################### !IF "$(RELBLD)" == "" !MESSAGE Debugging Build CFLAGS_DOR = /Zi /Od /Ot /Fd$(OBJDIRSL)$(NAME).pdb CDEFINES_DOR = /D"_DEBUG" SYSTEM_LIBS_DOR = LFLAGS_DOR = /DEBUG /DEBUGTYPE:cv LIBFLAGS_DOR = /DEBUGTYPE:cv RC_FLAGS_DOR = /d_DEBUG MTL_FLAGS_DOR = /Zi MAPFILE_DOR = /map:$(NAME).map !ELSE !MESSAGE Release Build CFLAGS_DOR = /O2 /Oaw CDEFINES_DOR = /D"NDEBUG" SYSTEM_LIBS_DIR = LFLAGS_DOR = LIBFLAGS_DOR = RC_FLAGS_DOR = /dNDEBUG MTL_FLAGS_DOR = MAPFILE_DOR = !ENDIF ########################################################################### # # Flags for compilation, resource file processing, and linking # ########################################################################### CFLAGS = /c /W3 /WX /LD /MD /nologo $(CFLAGS_DOR) $(CpuOptFlags) CDEFINES = /D"_WINDOWS" /D"WIN32" $(CDEFINES_DOR) CFILESPEC = $(OBJOUTPUT) /Fp$(PCH_FILE) LFLAGS = /DLL /NOLOGO /SUBSYSTEM:windows,4.0 $(LFLAGS_DOR) /nodefaultlib:LIBCMT LIBFLAGS = /NOLOGO $(LIBFLAGS_DOR) RC_FLAGS = /r /d, /dWIN32 $(RC_FLAGS_DOR) /Fo $(RES_FILES) MTL_FLAGS = /DIS_32 /c /W3 /nologo $(MTL_FLAGS_DOR) MAPFILE = $(MAPFILE_DOR) !ifndef VERMAINT # This must be numeric! VERMAINT=88 !endif !ifndef VERDEV # This must be numeric! VERDEV=888 !endif ########################################################################### # # Transformation Rules # ########################################################################### !ifdef COPYDIR ECHOCHAR=@ !endif # DON'T use precompiled header for $(OBJ_NO_PCH)! # $(OBJ_NO_PCH) alters the functionality of the header files. $(OBJ_NO_PCH): $(*B).c $(HDRS) makefile $(ECHOCHAR)cl $(CFLAGS) $(CDEFINES) $(CFILESPEC) $(*B).c $(PCH_FILE) $(OBJ_MAKE_PCH): clear.c $(HDRS) $(OBJ_NO_PCH) $(ECHOCHAR)cl $(CFLAGS) $(CDEFINES) $(CFILESPEC) -Yc$(PCH_BASE) clear.c $(OBJ_USE_PCH): $(OBJ_MAKE_PCH) $(*B).c $(PCH_FILE) $(ECHOCHAR)cl $(CFLAGS) $(CDEFINES) $(CFILESPEC) -Yu$(PCH_BASE) $(*B).c $(RES_FILES): $(*B).rc $(HDRS) $(I)\oiver.h makefile $(ECHOCHAR)rc $(RC_FLAGS) $(NAME).rc $(OBJDIRSL)$(NAME).dll: $(RES_FILES) $(NAME).def $(OUR_LIBS_DEP) $(OBJ_FILES) $(OBJDIRSL)$(NAME).lib link @<< $(LFLAGS) /out:$(OBJDIRSL)$(NAME).dll $(OBJDIRSL)$(NAME).exp $(OBJ_FILES) $(MAPFILE) $(RES_FILES) $(LIBS) << !ifdef COPYDIR copy $(OBJDIRSL)$(NAME).dll $(COPYDIR) !endif !ifdef COPYDIR2 copy $(OBJDIRSL)$(NAME).dll $(COPYDIR2) beep !endif $(OBJDIRSL)$(NAME).lib: $(OBJDIRSL)$(NAME).res $(NAME).def $(OBJ_FILES) makefile lib @<< /def:$(NAME).def $(LIBFLAGS) /out:$(OBJDIRSL)$(NAME).lib $(OBJ_FILES) << $(PROJ).bsc: $(SBRS) bscmake /o$(NAME).bsc $(SBRS)