# ftop - show progress of open files and file systems
# Copyright (C) 2009  Jason Todd <jtodd1@earthlink.net>
#
# This program 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.
#
# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.

# makefile-dev - Makefile, ONLY to be used to assist development of ftop

FTOP = ftop
FTOP_OBJS = options.o snapshot.o ui.o help.o version.o log.o
CFLAGS += -Wall -pedantic -O2 -I..
LDLIBS += -lcurses

LICENSE_FILE = ../COPYING

$(FTOP): $(FTOP_OBJS)

$(FTOP_OBJS): %.o: %.c

# generate a new license.h, using srec_cat, if the license file (COPYING) is
# ever updated or changed
license.h: $(LICENSE_FILE)
	@if [ ! -f $(LICENSE_FILE) ]; then echo "License file $(LICENSE_FILE) not found."; exit 1; fi
	srec_cat $< -Binary -Output $@ -C-Array license -No-CONST

clean:
	-rm -f $(FTOP_OBJS) $(FTOP)
