Add nmake build and capture run example
This commit is contained in:
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
TARGET = main.exe
|
||||
BUILDDIR = build
|
||||
SOURCES = main.cpp capture_file_writer.cpp tty_protocol_writer.cpp
|
||||
OBJS = $(BUILDDIR)\main.obj $(BUILDDIR)\capture_file_writer.obj $(BUILDDIR)\tty_protocol_writer.obj
|
||||
CXXFLAGS = /nologo /std:c++17 /EHsc /O2 /I.
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(SOURCES)
|
||||
if not exist $(BUILDDIR) mkdir $(BUILDDIR)
|
||||
cl $(CXXFLAGS) /Fo$(BUILDDIR)\ /Fd$(BUILDDIR)\ /Fe$(TARGET) $(SOURCES)
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
clean:
|
||||
-del /Q $(TARGET) 2>nul
|
||||
-if exist $(BUILDDIR) rmdir /S /Q $(BUILDDIR)
|
||||
|
||||
run-help: $(TARGET)
|
||||
$(TARGET) help
|
||||
Reference in New Issue
Block a user