Nmakefile: build factor.dll and link in resource file
parent
a2539b784b
commit
d478fd01f0
29
Nmakefile
29
Nmakefile
|
@ -1,8 +1,9 @@
|
|||
LINK_CLFAGS =
|
||||
CL_FLAGS = /O2 /W3
|
||||
LINK_CLFAGS = /nologo
|
||||
CL_FLAGS = /nologo /O2 /W3
|
||||
|
||||
OBJS = vm\main-windows-nt.obj \
|
||||
vm\os-windows-nt.obj \
|
||||
EXE_OBJS = factor.dll.lib vm\main-windows-nt.obj vm\factor.res
|
||||
|
||||
DLL_OBJS = vm\os-windows-nt.obj \
|
||||
vm\os-windows.obj \
|
||||
vm\aging_collector.obj \
|
||||
vm\alien.obj \
|
||||
|
@ -47,19 +48,29 @@ OBJS = vm\main-windows-nt.obj \
|
|||
vm\words.obj
|
||||
|
||||
.cpp.obj:
|
||||
cl /nologo /EHsc $(CL_FLAGS) /Fo$@ /c $<
|
||||
cl /EHsc $(CL_FLAGS) /Fo$@ /c $<
|
||||
|
||||
.rs.res:
|
||||
rc $<
|
||||
|
||||
all: factor.com factor.exe
|
||||
|
||||
factor.com: $(OBJS)
|
||||
link $(LINK_FLAGS) /nologo /out:factor.com /SUBSYSTEM:console $(OBJS)
|
||||
factor.dll.lib: $(DLL_OBJS)
|
||||
link $(LINK_FLAGS) /implib:factor.dll.lib /out:factor.dll /dll $(DLL_OBJS)
|
||||
|
||||
factor.exe: $(OBJS)
|
||||
link $(LINK_FLAGS) /nologo /out:factor.exe /SUBSYSTEM:windows $(OBJS)
|
||||
factor.com: $(EXE_OBJS)
|
||||
link $(LINK_FLAGS) /out:factor.com /SUBSYSTEM:console $(EXE_OBJS)
|
||||
|
||||
factor.exe: $(EXE_OBJS)
|
||||
link $(LINK_FLAGS) /out:factor.exe /SUBSYSTEM:windows $(EXE_OBJS)
|
||||
|
||||
clean:
|
||||
del vm\*.obj
|
||||
del factor.com
|
||||
del factor.exe
|
||||
del factor.dll
|
||||
del factor.dll.lib
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
.SUFFIXES: .rs
|
||||
|
|
Binary file not shown.
|
@ -20,11 +20,11 @@ typedef char symbol_char;
|
|||
|
||||
#define FACTOR_OS_STRING "winnt"
|
||||
|
||||
#define FACTOR_DLL L"factor.dll"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define FACTOR_DLL NULL
|
||||
#define FACTOR_STDCALL(return_type) return_type __stdcall
|
||||
#else
|
||||
#define FACTOR_DLL L"factor.dll"
|
||||
#define FACTOR_STDCALL(return_type) __attribute__((stdcall)) return_type
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue