# -----------------------------------------------------------------------
# Makefile for imond on eisfair
#
# Creation   :  longtime ago fm
# Last Update:  $Id$
#
# Copyright (c) 2011-2018 the eisfair team
#
# 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 2 of the License, or
# (at your option) any later version.
# ----------------------------------------------------------------------

CFLAGS += -Os -fstrength-reduce -Wall -s -Wno-strict-aliasing
CC=gcc

TARGETS =	imond  imonc  imond-stat

all: $(TARGETS)

clean:
	for i in $(TARGETS); do 		\
		if [ -d $$i ]; then		\
			make -C $$i clean ;	\
		else				\
			rm -f $$i ;		\
		fi ;				\
	done

imond:
	$(CC) $(CFLAGS) md5.c imond.c -lcrypt -o imond
	
imonc:
	$(CC) $(CFLAGS) imonc.c -o imonc -lncurses

imond-stat:
	$(CC) $(CFLAGS) imond-stat.c -o imond-stat
 
# Just some depends
imond.o: imond.c md5.h
md5.o: md5.c md5.h