changed the way how the library is built
- now there is only one Makefile in the root directory and we have only one pikotools.a lib file - removed: mainparser
This commit is contained in:
74
Makefile
74
Makefile
@@ -1,4 +1,14 @@
|
||||
# Makefile for GNU make
|
||||
sourcefiles:=$(shell find . -name "*.cpp")
|
||||
objfiles:=$(patsubst %.cpp,%.o,$(sourcefiles))
|
||||
|
||||
|
||||
|
||||
CXX = g++10
|
||||
#CXX = clang++
|
||||
#CXXFLAGS = -fsanitize=address -O0 -g3 -gdwarf-2 -O0 -std=c++14 -I../ttmath -I../pikotools -Wl,-rpath=/usr/local/lib/gcc5/ -Wall -pedantic -Wextra
|
||||
#CXXFLAGS = -O0 -g3 -gdwarf-2 -O0 -std=c++17 -I../ttmath -I../pikotools -Wl,-rpath=/usr/local/lib/gcc7/ -Wall -pedantic -Wextra
|
||||
CXXFLAGS = -Wl,-rpath=/usr/local/lib/gcc10/ -O0 -g3 -std=c++20 -I../pikotools -Wall -pedantic
|
||||
|
||||
|
||||
ifndef CXX
|
||||
CXX = clang++
|
||||
@@ -16,61 +26,35 @@ ifndef AR
|
||||
AR = ar
|
||||
endif
|
||||
|
||||
#CXX=g++5
|
||||
#CXXFLAGS=-Wall -O0 -g3 -gdwarf-2 -std=c++14
|
||||
|
||||
export CXX
|
||||
export CXXFLAGS
|
||||
export LDFLAGS
|
||||
export AR
|
||||
#export CXX
|
||||
#export CXXFLAGS
|
||||
#export LDFLAGS
|
||||
#export AR
|
||||
|
||||
|
||||
all: space mainparser mainspaceparser utf8 date convert log
|
||||
libname = pikotools.a
|
||||
|
||||
|
||||
all: $(libname)
|
||||
|
||||
|
||||
space: FORCE
|
||||
@cd space ; $(MAKE) -e
|
||||
|
||||
mainparser: FORCE
|
||||
@cd mainparser ; $(MAKE) -e
|
||||
|
||||
mainspaceparser: FORCE
|
||||
@cd mainspaceparser ; $(MAKE) -e
|
||||
|
||||
utf8: FORCE
|
||||
@cd utf8 ; $(MAKE) -e
|
||||
|
||||
date: FORCE
|
||||
@cd date ; $(MAKE) -e
|
||||
|
||||
convert: FORCE
|
||||
@cd convert ; $(MAKE) -e
|
||||
|
||||
log: FORCE
|
||||
@cd log ; $(MAKE) -e
|
||||
$(libname): $(objfiles)
|
||||
$(AR) rcs $(libname) $(objfiles)
|
||||
|
||||
|
||||
|
||||
|
||||
FORCE:
|
||||
%.o: %.cpp
|
||||
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
||||
|
||||
|
||||
clean:
|
||||
@cd space ; $(MAKE) -e clean
|
||||
@cd mainparser ; $(MAKE) -e clean
|
||||
@cd mainspaceparser ; $(MAKE) -e clean
|
||||
@cd utf8 ; $(MAKE) -e clean
|
||||
@cd date ; $(MAKE) -e clean
|
||||
@cd convert ; $(MAKE) -e clean
|
||||
@cd log ; $(MAKE) -e clean
|
||||
rm -f $(objfiles)
|
||||
rm -f $(libname)
|
||||
|
||||
|
||||
depend:
|
||||
@cd space ; $(MAKE) -e depend
|
||||
@cd mainparser ; $(MAKE) -e depend
|
||||
@cd mainspaceparser ; $(MAKE) -e depend
|
||||
@cd utf8 ; $(MAKE) -e depend
|
||||
@cd date ; $(MAKE) -e depend
|
||||
@cd convert ; $(MAKE) -e depend
|
||||
@cd log ; $(MAKE) -e depend
|
||||
makedepend -Y. -f- $(sourcefiles) > Makefile.dep
|
||||
|
||||
|
||||
-include Makefile.dep
|
||||
|
||||
|
Reference in New Issue
Block a user