aboutsummaryrefslogblamecommitdiff
path: root/Makefile
blob: 05a908f8b408ee7aec1a7ea75d09519df453cd21 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                                    
               

                                    

                   



                                      


                                                              
                                              

                       


                                                                  

      
                           
                              
# Copyright (c) 2020 Johannes Stoelp

CXX      := g++
CXXFLAGS := -g -O0 -Wall -Wextra -I.

lib/libmatcha.a:
	make -C lib

%.o: %.cc
	$(CXX) -c -o $@ $^ $(CXXFLAGS)

fmt:
	fd --type f '.+.h$$|.+.cc$$' --exec clang-format -i {}

example/demo1: example/demo1.o lib/libmatcha.a
	$(CXX) -o $@ $^

gdb: example/demo1
	which cgdb && cgdb -x util.gdb -ex 'start' example/demo1 \
	           ||  gdb -x util.gdb -ex 'start' example/demo1

clean:
	rm -f example/demo1
	rm -f **/*.o **/lib*.a