summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 65e6f1b)
raw | patch | inline | side by side (parent: 65e6f1b)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 18 Aug 2018 10:16:54 +0000 (13:16 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sat, 18 Aug 2018 10:16:54 +0000 (13:16 +0300) |
Makefile | patch | blob | history | |
main/odcread.cc | patch | blob | history |
diff --git a/Makefile b/Makefile
index 3e394f058f9f266778df401a8587d539ddf54e10..0dbb36af4808f0d829814dcb6fb26e8040308210 100644 (file)
--- a/Makefile
+++ b/Makefile
# * $(MODULE)/*.cc -- module source files
MODULES := main reader store alien typeregister textmodel fold typepath
-CFLAGS += -I.
+CFLAGS = -I.
+CC = g++
# Variables for the modules to write to
SRCS :=
# This rule just links the object files together
odcread: $(SRCS:.cc=.o)
- g++ -o $@ $^
+ $(CC) -o $@ $^
# This rule build an object (.o) from a source (.cc).
%.o: %.cc
- g++ $(CFLAGS) $< -c -o $@
+ $(CC) $(CFLAGS) $< -c -o $@
# For each implementation header (.ih) generate a dependency (.d) file which
# will ensure that the compiled header (.ih.gch) is rebuilt whenever the header
# The .d file is not an explicit target because it will need to be (re-)built
# if and only if the .ih.gch needs to be rebuilt.
%.ih.gch: %.ih
- g++ $(CFLAGS) -x c++-header $< -MM -MF $*.d -MP -MT $@
- g++ $(CFLAGS) -x c++-header $< -o $@
+ $(CC) $(CFLAGS) -x c++-header $< -MM -MF $*.d -MP -MT $@
+ $(CC) $(CFLAGS) -x c++-header $< -o $@
# Each module has a .ih file that should be *the only* include from the .cc
# files. These .ih files are pre-compiled to .ih.gch, and dependency caching
diff --git a/main/odcread.cc b/main/odcread.cc
index e6e174899125370fffc9d2bb0ea337e972f3dd56..a2a2bd57dca6ec919de8e4918e6916460049a9c0 100644 (file)
--- a/main/odcread.cc
+++ b/main/odcread.cc
try {
if (argc < 2) {
s = odc::importDocument(std::cin);
- } else if (argc = 2) {
+ } else if (argc == 2) {
std::ifstream in(argv[1], std::ios::in | std::ios::binary);
s = odc::importDocument(in);
} else {