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