#ProfiPacket - packet radio terminal program
#Copyright (C) 1999  Alexander Feigl
#
#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.
#
#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, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#Author:
#
#Alexander Feigl
#Burachstraße 51
#
#D-88250 Weingarten
#
#EMail : Alexander.Feigl@gmx.de

INCLUDES= -I$(top_srcdir)/ProfiPacket
SUBDIRS = 
ASM = @ASM@
ACONV = ../Tools/amiga_fixbaserel

noinst_PROGRAMS =  BBS.Server Chat.Server Miscellaneous.Server \
                FileAccess.Server UserSettings.Server Interlink.Server \
                Converse.Server Mail.Server Datacollector.Server \
                Connect.Server

BBS_Server_SOURCES = BBS.s Huffman.c CRC.c 
Chat_Server_SOURCES = Chat.s
Miscellaneous_Server_SOURCES = Miscellaneous.s
FileAccess_Server_SOURCES = FileAccess.s
UserSettings_Server_SOURCES = UserSettings.s
Interlink_Server_SOURCES = Interlink.s
Converse_Server_SOURCES = Converse.s
Mail_Server_SOURCES = Mail.s
Datacollector_Server_SOURCES = Datacollector.s
Connect_Server_SOURCES = Connect.s


DISTCLEANFILES = .deps/* 
CLEANFILES = *~ *.bak *.ao
MAINTAINERCLEANFILES = Makefile.in

%.ao     : %.s  
	$(ASM) $(AOPTS) HEADER SHeader.i $< OBJ $*.ao

%.o     : %.ao %.s
	$(ACONV) $*.ao $@

%.Server : %.s
	$(ASM) $(AOPTS) HEADER SHeader.i EXEOBJ OBJ $*.Server $<


BBS.Server : BBS.o Huffman.o CRC.o
	$(LD) -L/gg/m68k-amigaos/lib/libb/libnix/ BBS.o Huffman.o CRC.o -o BBS.Server $(LIBDIR) -lnix

BBS.o : BBS.ao BBS.s ../global.i ../Catalogs/Sources/BBS.s

Chat.Server : Chat.s ../global.i ../Catalogs/Sources/Chat.s

Miscellaneous.Server : Miscellaneous.s ../global.i ../Catalogs/Sources/Miscellaneous.s

FileAccess.Server : FileAccess.s ../global.i ../Catalogs/Sources/FileAccess.s

UserSettings.Server : UserSettings.s ../global.i ../Catalogs/Sources/UserSettings.s

Interlink.Server : Interlink.s ../global.i ../Catalogs/Sources/Interlink.s

Converse.Server : Converse.s ../global.i Converse.s

Mail.Server : Mail.s ../global.i ../Catalogs/Sources/Mail.s

Datacollector.Server : Datacollector.s ../global.i ../Catalogs/Sources/Datacollector.s

Connect.Server : Connect.s ../global.i


AMINSTALL = $(prefix)/ppinstall/ProfiPacket/Profi_Packet

install-exec-local:
#amiga install section
	$(mkinstalldirs) $(AMINSTALL)/Servers
	$(INSTALL) BBS.Server $(AMINSTALL)/Servers
	$(INSTALL) Chat.Server $(AMINSTALL)/Servers
	$(INSTALL) Miscellaneous.Server $(AMINSTALL)/Servers
	$(INSTALL) FileAccess.Server $(AMINSTALL)/Servers
	$(INSTALL) UserSettings.Server $(AMINSTALL)/Servers
	$(INSTALL) Interlink.Server $(AMINSTALL)/Servers
	$(INSTALL) Converse.Server $(AMINSTALL)/Servers
	$(INSTALL) Mail.Server $(AMINSTALL)/Servers
	$(INSTALL) Datacollector.Server $(AMINSTALL)/Servers
	$(INSTALL) Connect.Server $(AMINSTALL)/Servers