# # Makefile # # This file is part of Glacier. # # Glacier is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later version. # # Glacier is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; # without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with Glacier. # If not, see . # include config.mk BDIR = ./build SDIR = ./src EDIR = ./etc all: prep gpkg syspkg glist gquery gpc glacier-mkprofile glacier-update-pkgdb @echo "Completed all build tasks." prep: mkdir -p $(BDIR) mkdir -p $(BDIR)/bin mkdir -p $(BDIR)/etc gpkg: $(SDIR)/gpkg.c $(CC) $(CFLAGS) $(SDIR)/gpkg.c -o $(BDIR)/bin/gpkg $(LIBS) syspkg: $(SDIR)/syspkg.c $(CC) $(CFLAGS) $(SDIR)/syspkg.c -o $(BDIR)/bin/syspkg $(LIBS) glist: $(SDIR)/glist.c $(CC) $(CFLAGS) $(LIBS) $(SDIR)/glist.c -o $(BDIR)/bin/glist gquery: $(SDIR)/gquery.c $(CC) $(CFLAGS) $(LIBS) $(SDIR)/gquery.c -o $(BDIR)/bin/gquery gpc: $(SDIR)/gquery.c $(CC) $(CFLAGS) $(LIBS) $(SDIR)/gquery.c -o $(BDIR)/bin/gquery glacier-mkprofile: $(SDIR)/glacier-mkprofile.c $(CC) $(CFLAGS) $(LIBS) $(SDIR)/glacier-mkprofile.c -o $(BDIR)/bin/glacier-mkprofile glacier_update_pkgdb: $(SDIR)/glacier-update-pkgdb $(CC) $(CFLAGS) $(LIBS) $(SDIR)/glacier-update-pkgdb -o $(BDIR)/bin/glacier-update-pkgdb install: install $(BDIR)/bin/gpkg -t $(PREFIX)/bin -m 644 install $(BDIR)/bin/syspkg -t $(PREFIX)/bin -m 644 install $(BDIR)/bin/glist -t $(PREFIX)/bin -m 644 install $(BDIR)/bin/gquery -t $(PREFIX)/bin -m 644 install $(BDIR)/bin/gpc -t $(PREFIX)/bin -m 644 install $(BDIR)/bin/glacier-mkprofile -t $(PREFIX)/bin -m 644 install $(BDIR)/bin/glacier-update-pkgdb -t $(PREFIX)/bin -m 644 install $(EDIR)/glacier.conf -t $(PREFIX)/etc -m 644 clean: rm -rf $(BDIR)