-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 1.11 KB
/
Makefile
File metadata and controls
47 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
##
# todo: cross-building for DOS? do people still use DOS?
# linux, maybe. if i can get the compiler to, y'know, compile.
# mac, probably not. don't even know if that's possible.
##
srcfiles = main.cpp lib.cpp
# the main one, for prototyping, debugging, etc
outfile_gcc = rmcpp.exe
# these are for testing, mostly.
outfile_clang = rmcppclang.exe
outfile_msc = rmcppvs.exe
outfile_clr = rmcppclr.exe
cxx_gcc = g++ -std=c++17
cxx_clang = clang++ -std=c++17
cxx_msc = cl -std:c++17
# just build gcc by default, please.
default: buildgcc postclean
buildall: buildgcc buildclang buildmsc buildclr postclean
postclean:
rm -f *.obj *.pdb *.mdb *.ilk
clean: postclean
rm -f *.exe
buildgcc: $(srcfiles)
$(cxx_gcc) -Wall -Wextra -g3 -ggdb3 $(srcfiles) -o $(outfile_gcc)
# don't use
buildclang: $(srcfilse)
$(cxx_clang) -Wall -Wextra $(srcfiles) -o $(outfile_clang)
# according to cl options, it's actually -Fe<str>
# but this is apparently the right way? wtf?
buildmsc: $(srcfiles)
$(cxx_msc) $(srcfiles) -link -out:$(outfile_msc)
buildclr: $(srcfiles)
$(cxx_msc) -clr:pure $(srcfiles) -link -out:$(outfile_clr)