solstice-pp

Post-processing utilities for the solstice app
git clone git://git.meso-star.com/solstice-pp.git
Log | Files | Refs | README | LICENSE

Makefile (1350B)


      1 # Copyright (C) 2017, 2018, 2025 |Méso|Star>
      2 #
      3 # This program is free software: you can redistribute it and/or modify
      4 # it under the terms of the GNU General Public License as published by
      5 # the Free Software Foundation, either version 3 of the License, or
      6 # (at your option) any later version.
      7 #
      8 # This program is distributed in the hope that it will be useful,
      9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
     10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11 # GNU General Public License for more details.
     12 #
     13 # You should have received a copy of the GNU General Public License
     14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
     15 
     16 .POSIX:
     17 
     18 include config.mk
     19 
     20 
     21 SRC = solmaps.c solpp.c solppraw.c solpaths.c
     22 PROG = $(SRC:.c=)
     23 
     24 PROJECTS = themis cyl
     25 
     26 default: $(PROG)
     27 
     28 install: $(PROG)
     29 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     30 	cp $(PROG) $(DESTDIR)$(PREFIX)/bin
     31 	for i in $(PROG); do chmod 755 "$(DESTDIR)$(PREFIX)/bin/$${i}"; done
     32 
     33 .PHONY: clean
     34 clean:
     35 	rm -rf $(PROG)
     36 	for i in $(PROJECTS); do $(MAKE) -C "$${i}" clean; done
     37 
     38 $(PROG): solpp.h
     39 	$(CC) -o $@ $(CFLAGS) $@.c
     40 
     41 run: $(PROJECTS)
     42 
     43 $(PROJECTS): $(PROG)
     44 	@echo "----------------------------------------------------------------------"
     45 	@echo -e " Run $@"
     46 	@echo "----------------------------------------------------------------------"
     47 	@$(MAKE) -C $@