--- q_a/samples/simpldll/makefile 2018/08/09 18:29:19 1.1 +++ q_a/samples/simpldll/makefile 2018/08/09 18:29:48 1.1.1.3 @@ -1,62 +1,49 @@ -# Nmake macros for building Windows 32-Bit apps - !include -# This line allows NMAKE to work as well all: linktest.exe loadtest.exe the_dll.dll -# Update the object files if necessary linktest.obj: linktest.c - $(cc) $(cflags) $(cvars) linktest.c + $(cc) $(cdebug) $(cflags) $(cvarsdll) linktest.c loadtest.obj: loadtest.c - $(cc) $(cflags) $(cvars) loadtest.c + $(cc) $(cdebug) $(cflags) $(cvarsdll) loadtest.c the_dll.obj: the_dll.c - $(cc) $(cflags) $(cvars) the_dll.c + $(cc) $(cdebug) $(cflags) $(cvarsdll) the_dll.c -# Update the resources if necessary -linktest.res: linktest.rc linktest.h - rc -r -fo linktest.tmp linktest.rc - cvtres -$(CPU) linktest.tmp -o linktest.res - del linktest.tmp - -loadtest.res: loadtest.rc loadtest.h - rc -r -fo loadtest.tmp loadtest.rc - cvtres -$(CPU) loadtest.tmp -o loadtest.res - del loadtest.tmp - -the_dll.res: the_dll.rc - rc -r -fo the_dll.tmp the_dll.rc - cvtres -$(CPU) the_dll.tmp -o the_dll.res - del the_dll.tmp +linktest.rbj: linktest.rc linktest.h + rc -r -fo linktest.res linktest.rc + cvtres -$(CPU) linktest.res -o linktest.rbj -# Update the import library +loadtest.rbj: loadtest.rc loadtest.h + rc -r -fo loadtest.res loadtest.rc + cvtres -$(CPU) loadtest.res -o loadtest.rbj -the_dll.lib: the_dll.obj the_dll.def - lib -machine:$(CPU) \ - -def:the_dll.def \ - -out:the_dll.lib +the_dll.rbj: the_dll.rc + rc -r -fo the_dll.res the_dll.rc + cvtres -$(CPU) the_dll.res -o the_dll.rbj -# Update the dynamic link library -the_dll.dll: the_dll.obj the_dll.def the_dll.res - $(link) \ +the_dll.lib: the_dll.obj the_dll.def + $(implib) -machine:$(CPU) \ + -def:the_dll.def \ + the_dll.obj \ + -out:the_dll.lib \ + +the_dll.dll: the_dll.obj the_dll.def the_dll.rbj + $(link) $(linkdebug) \ -base:0x1C000000 \ -dll \ - -entry:DLLEntryPoint \ + -entry:_DllMainCRTStartup$(DLLENTRY) \ -out:the_dll.dll \ - the_dll.res the_dll.exp the_dll.obj $(guilibs) - + the_dll.rbj the_dll.exp the_dll.obj $(guilibsdll) -# Update the executable file if necessary. -# If so, add the resource back in. -linktest.exe: linktest.obj the_dll.lib linktest.res linktest.def - $(link) $(guiflags) -out:linktest.exe linktest.obj the_dll.lib linktest.res $(guilibs) +linktest.exe: linktest.obj the_dll.lib linktest.rbj linktest.def + $(link) $(linkdebug) $(guiflags) -out:linktest.exe linktest.obj the_dll.lib linktest.rbj $(guilibsdll) -loadtest.exe: loadtest.obj loadtest.res loadtest.def - $(link) $(guiflags) -out:loadtest.exe loadtest.obj loadtest.res $(guilibs) +loadtest.exe: loadtest.obj loadtest.rbj loadtest.def + $(link) $(linkdebug) $(guiflags) -out:loadtest.exe loadtest.obj loadtest.rbj $(guilibsdll)