1 | ######################################################################
|
---|
2 | #
|
---|
3 | # Project: XTIDE Universal BIOS, Serial Port Server
|
---|
4 | #
|
---|
5 | # File: makefile
|
---|
6 | #
|
---|
7 | # Use with GNU Make or Microsoft Nmake
|
---|
8 | # Build with Microsoft Visual C++ 2010 or Windows SDK v7.1
|
---|
9 | #
|
---|
10 | # Also works with Open Watcom C/C++ Version 1.9
|
---|
11 | #
|
---|
12 |
|
---|
13 | HEADERS = library/library.h win32/win32file.h win32/win32serial.h library/file.h library/flatimage.h
|
---|
14 |
|
---|
15 | CXX = cl
|
---|
16 | CXXFLAGS = /Ox /DWIN32
|
---|
17 |
|
---|
18 | WIN32OBJS = build/win32.obj build/checksum.obj build/serial.obj build/process.obj build/image.obj
|
---|
19 |
|
---|
20 | build/serdrive.exe: $(WIN32OBJS)
|
---|
21 | @$(CXX) /Febuild/serdrive.exe $(WIN32OBJS)
|
---|
22 |
|
---|
23 | build/win32.obj: win32/win32.cpp $(HEADERS)
|
---|
24 | @$(CXX) /c $(CXXFLAGS) win32/win32.cpp /Fobuild/win32.obj
|
---|
25 |
|
---|
26 | build/checksum.obj: library/checksum.cpp $(HEADERS)
|
---|
27 | @$(CXX) /c $(CXXFLAGS) library/checksum.cpp /Fobuild/checksum.obj
|
---|
28 |
|
---|
29 | build/serial.obj: library/serial.cpp $(HEADERS)
|
---|
30 | @$(CXX) /c $(CXXFLAGS) library/serial.cpp /Fobuild/serial.obj
|
---|
31 |
|
---|
32 | build/process.obj: library/process.cpp $(HEADERS)
|
---|
33 | @$(CXX) /c $(CXXFLAGS) library/process.cpp /Fobuild/process.obj
|
---|
34 |
|
---|
35 | build/image.obj: library/image.cpp $(HEADERS)
|
---|
36 | @$(CXX) /c $(CXXFLAGS) library/image.cpp /Fobuild/image.obj
|
---|
37 |
|
---|
38 |
|
---|
39 | release: build/serdrive.exe
|
---|
40 | @echo Compressing with UPX...
|
---|
41 | @upx -qq --ultra-brute build/serdrive.exe
|
---|
42 | @echo Done!
|
---|
43 |
|
---|
44 | clean:
|
---|
45 | @del /q build\*.*
|
---|
46 |
|
---|
47 |
|
---|
48 | build/checksum_test.exe: library/checksum.cpp
|
---|
49 | @$(CXX) /Febuild/checksum_test.exe /Ox library/checksum.cpp /Fobuild/checksum_test.obj -D CHECKSUM_TEST
|
---|
50 |
|
---|