#!/usr/bin/make -f

# ispCP ω (OMEGA) a Virtual Hosting Control Panel
# Copyright (C) 2001-2006 by moleSoftware GmbH - http://www.molesoftware.com
# Copyright (C) 2006-2010 by isp Control Panel - http://ispcp.net
#
# Version: $Id: BSDmakefile 2505 2010-01-06 20:30:53Z nuxwin $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is "VHCS - Virtual Hosting Control System".
#
# The Initial Developer of the Original Code is moleSoftware GmbH.
# Portions created by Initial Developer are Copyright (C) 2001-2006
# by moleSoftware GmbH. All Rights Reserved.
# Portions created by the ispCP Team are Copyright (C) 2006-2010 by
# isp Control Panel. All Rights Reserved.
#
# The ispCP ω Home Page is:
#
#    http://isp-control.net
#

#.if eq (,$(findstring noopt,$(DAEMON_OPTIONS)))
#CFLAGS += -O3
#.else
#CFLAGS += -O0
#.endif


OBJS = ispcp_daemon.o message.o daemon_init.o say.o signal-handlers.o\
receive_data.o send_data.o take_connection.o send_line.o recv_line.o\
helo_cmd.o helo_syntax.o lr_cmd.o lr_syntax.o bye_cmd.o bye_syntax.o

BUILD = gcc -ansi -Wall -Wstrict-prototypes -pedantic $(CFLAGS)

COMPILE = gcc -ansi -Wall -Wstrict-prototypes -pedantic -c $(CFLAGS)

ispcp_daemon: $(OBJS)
	$(BUILD) -o ispcp_daemon $(OBJS)
#ifeq (,$(findstring nostrip,$(DAEMON_OPTIONS)))
	strip -s ispcp_daemon
#endif

%.o: %.c %.h
	$(COMPILE) -o $@ $*.c

clean:
	rm -rf *~
	rm -rf *.o
	rm -rf ispcp_daemon

.PHONY: clean
