2012-01-08 05:08:02 +01:00
|
|
|
include Makefile.o.dep
|
|
|
|
|
2012-01-12 03:33:05 +01:00
|
|
|
libname=tito.a
|
2012-01-08 05:08:02 +01:00
|
|
|
|
2016-03-18 10:25:47 +01:00
|
|
|
ifndef GLOBAL_WORKING_DIR
|
|
|
|
GLOBAL_WORKING_DIR := $(shell pwd)/../..
|
|
|
|
endif
|
|
|
|
|
|
|
|
current_path := $(shell pwd)
|
|
|
|
global_relative_working_dir := $(shell relative_path $(current_path) $(GLOBAL_WORKING_DIR))
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-12 03:33:05 +01:00
|
|
|
all: $(libname)
|
2012-01-08 05:08:02 +01:00
|
|
|
|
2012-01-12 03:33:05 +01:00
|
|
|
$(libname): $(o)
|
2014-11-12 05:12:13 +01:00
|
|
|
$(AR) rcs $(libname) $(o)
|
2012-01-08 05:08:02 +01:00
|
|
|
|
|
|
|
|
2016-03-18 10:25:47 +01:00
|
|
|
|
2012-01-08 05:08:02 +01:00
|
|
|
%.o: %.cpp
|
2021-05-27 12:07:13 +02:00
|
|
|
$(CXX) -c $(CXXFLAGS) -I$(GLOBAL_WORKING_DIR)/pikotools/src $<
|
2012-01-08 05:08:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
depend:
|
2021-05-27 12:07:13 +02:00
|
|
|
makedepend -Y. -I$(global_relative_working_dir)/pikotools/src -f- *.cpp > Makefile.dep
|
2012-01-08 05:08:02 +01:00
|
|
|
echo -n "o = " > Makefile.o.dep
|
|
|
|
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
2012-01-12 03:33:05 +01:00
|
|
|
rm -f $(libname)
|
2012-01-08 05:08:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
include Makefile.dep
|