2 # ========================================================================
3 # Copyright 2006 University of Washington
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # ========================================================================
14 # Nmake macros for building Windows 32-Bit apps
16 all: pmapi32.dll instmapi.exe
19 del
*.obj
*.res
*.dll
*.lib
*.exe
25 CBASIC
= -nologo
-c
-W3
-DWIN32
-D_WIN32
27 LDEBUG
= #/debug /debugtype:cv
30 CFLAGS
= $(CBASIC
) $(CDEBUG
) $(EXTRACFLAGS
)
31 RCFLAGS
= /fo pmapi.res
33 DLLLFLAGS
= -entry
:_DllMainCRTStartup
$(DLLENTRY
) -dll
$(EXTRALDFLAGS
)
34 GUIFLAGS
= -subsystem
:windows
35 LFLAGS
= $(LDEBUG
) -nologo
/NODEFAULTLIB
36 STDLIBS
= ..\c-client-dll\cclient.lib winmm.lib crypt32.lib
37 LIBS
= oldnames.lib kernel32.lib advapi32.lib ws2_32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib
38 LIBSDLL
= msvcrt.lib
$(LIBS
) $(EXTRALIBES
)
39 LIBSEXE
= libcmt.lib
$(LIBS
)
41 # Update the object files if necessary
43 pmapi.obj
: pmapi.c ..\c-client-dll\mail.h pmapi.h
44 $(CC
) $(CFLAGS
) $(CVARSDLL
) pmapi.c
45 smapi.obj
: smapi.c ..\c-client-dll\mail.h pmapi.h
46 $(CC
) $(CFLAGS
) $(CVARSDLL
) smapi.c
47 rfc1522.obj
: rfc1522.c ..\c-client-dll\mail.h pmapi.h
48 $(CC
) $(CFLAGS
) $(CVARSDLL
) rfc1522.c
50 instmapi.obj
: instmapi.c
51 $(CC
) $(CFLAGS
) instmapi.c
53 # Update the import library
56 $(RC
) $(RCFLAGS
) pmapi.rc
58 # Update the dynamic link library
60 pmapi32.dll
: pmapi.obj smapi.obj rfc1522.obj pmapi.def pmapi.res
61 ..\pico
\blddate
> bdate.c
62 $(CC
) /c
$(CFLAGS
) bdate.c
63 $(LINK
) $(LFLAGS
) $(DLLLFLAGS
)\
67 pmapi.obj smapi.obj rfc1522.obj bdate.obj pmapi.res
$(STDLIBS
) $(LIBSDLL
)
69 instmapi.exe
: instmapi.obj
70 $(LINK
) $(LFLAGS
) $(GUIFLAGS
) -out
:instmapi.exe instmapi.obj
$(LIBSEXE
)