X-Git-Url: https://deadsoftware.ru/gitweb?p=odcread.git;a=blobdiff_plain;f=Makefile;h=b1fac089f138b1ae207a0a16fec379fe5e6e6f2c;hp=3e394f058f9f266778df401a8587d539ddf54e10;hb=HEAD;hpb=68f5d585dbbada3c3c69ac2cd9ba8e6d2ef3adae diff --git a/Makefile b/Makefile index 3e394f0..b1fac08 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ # * $(MODULE)/*.cc -- module source files MODULES := main reader store alien typeregister textmodel fold typepath -CFLAGS += -I. +CXXFLAGS = -I. +CXX = g++ # Variables for the modules to write to SRCS := @@ -16,11 +17,11 @@ include $(patsubst %,%/Make.inc,$(MODULES)) # This rule just links the object files together odcread: $(SRCS:.cc=.o) - g++ -o $@ $^ + $(CXX) -liconv -o $@ $^ # This rule build an object (.o) from a source (.cc). %.o: %.cc - g++ $(CFLAGS) $< -c -o $@ + $(CXX) $(CXXFLAGS) $< -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 @@ -33,8 +34,8 @@ odcread: $(SRCS:.cc=.o) # 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 $@ + $(CXX) $(CXXFLAGS) -x c++-header $< -MM -MF $*.d -MP -MT $@ + $(CXX) $(CXXFLAGS) -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