From 3032869b86efa52f20ad9840381a37017980f587 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 31 Jan 2020 17:16:27 +0300 Subject: [xift] Almost done. --- Makefile | 8 +++----- examples/Makefile | 15 +++++---------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 0d85446..5807ec9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Debug mode: -DEBUG = yes +# DEBUG = yes CC = g++ LIB = libtexo.a -CPPFLAGS = -Wall -ansi +CPPFLAGS = -Wall -ansi -pedantic ifeq '$(DEBUG)' 'yes' CPPFLAGS += -g -O0 else @@ -15,8 +15,6 @@ SRC_DIR = src SRC = $(wildcard $(SRC_DIR)/*.cpp) OBJ = $(SRC:.cpp=.o) -INCLUDE = -I../lib/scriptpp - default: $(LIB) @@ -28,7 +26,7 @@ deps.mk: $(SRC) $(CC) -MM $^ > $@ %.o: %.cpp %.hpp - $(CC) $(CPPFLAGS) $(INCLUDE) -c $< -o $@ + $(CC) $(CPPFLAGS) -c $< -o $@ $(LIB): $(OBJ) ar rcs $@ $^ diff --git a/examples/Makefile b/examples/Makefile index 7d9937c..a3662b2 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,22 +1,20 @@ # Uncomment following to enable debug mode: -DEBUG = yes +# DEBUG = yes CC = g++ EXAMPLES = plain lines markdown -CPPFLAGS = -Wall -ansi +CPPFLAGS = -Wall -ansi -pedantic ifeq '$(DEBUG)' 'yes' CPPFLAGS += -g -O0 else CPPFLAGS += -O3 endif -INCLUDE = -I../src -I$(SCRIPTDIR) -LFLAGS = -L.. -ltexo -L$(SCRIPTDIR) -lscriptpp +INCLUDE = -I../src +LFLAGS = -L.. -ltexo TEXO = ../libtexo.a -SCRIPTDIR = ../../lib/scriptpp -SCRIPTPP = $(SCRIPTDIR)/libscriptpp.a default: $(EXAMPLES) @@ -24,10 +22,7 @@ default: $(EXAMPLES) $(TEXO): cd ..; $(MAKE) -$(SCRIPTPP): - cd $(SCRIPTDIR); $(MAKE) - -%: %.cpp $(SCRIPTPP) $(TEXO) +%: %.cpp $(TEXO) $(CC) $(CPPFLAGS) $(INCLUDE) $< $(LFLAGS) -o $@ clean: -- cgit v1.2.3