Makefile
changeset 28 ef929533d040
child 30 eed9f710ba3b
equal deleted inserted replaced
27:4a2f7a1492ab 28:ef929533d040
       
     1 MAKE=make --no-print-directory
       
     2 CMAKE=cmake
       
     3 RMDIR=rm -rf
       
     4 RM=rm -f
       
     5 
       
     6 ALL: build
       
     7 
       
     8 build: build/Makefile
       
     9 	@$(MAKE) -C build
       
    10 
       
    11 prepare:
       
    12 	@if [ ! -d build ]; then mkdir build; fi
       
    13 
       
    14 build/Makefile: prepare
       
    15 	cd build && $(CMAKE) ../src
       
    16 
       
    17 .PHONY: distclean prepare beauty
       
    18 
       
    19 clean: build/Makefile
       
    20 	@$(MAKE) -C build clean
       
    21 
       
    22 distclean:
       
    23 	$(RMDIR) build
       
    24 
       
    25 install: build/Makefile
       
    26 	$(MAKE) -C build install
       
    27 
       
    28 beauty:
       
    29 	find -name '*.[ch]' -exec indent {} \;
       
    30 	find -name '*.[ch]' -exec eraser {} \;
       
    31 	find -name '*~' -exec rm -f {} \;