########################################################################
#                                                                      #
#    *****                       *****                                 #
#      *****                   *****                                   #
#        *****               *****                                     #
#          *****           *****                                       #
#  ***************       ***************                               #
#  *****************   *****************                               #
#  ***************       ***************                               #
#          *****           *****           TheNetNode                  #
#        *****               *****         Portable                    #
#      *****                   *****       Network                     #
#    *****                       *****     Software                    #
#                                                                      #
# File makefile (maintained by: DG8BR)                                 #
#                                                                      #
# Copyright (C) 1998  NORD><LINK e.V. Braunschweig                     #
#                                                                      #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the NORD><LINK ALAS (Allgemeine Lizenz fuer    #
# Amateurfunk Software) as published by Hans Georg Giese (DF2AU)       #
# on 13/Oct/1992; either version 1, or (at your option) any later      #
# version.                                                             #
#                                                                      #
# This program is distributed WITHOUT ANY WARRANTY only for further    #
# development and learning purposes. See the ALAS (Allgemeine Lizenz   #
# fuer Amateurfunk Software).                                          #
#                                                                      #
# You should have received a copy of the NORD><LINK ALAS (Allgemeine   #
# Lizenz fuer Amateurfunk Software) along with this program; if not,   #
# write to NORD><LINK e.V., Hinter dem Berge 5, D-38108 Braunschweig   #
#                                                                      #
# Dieses Programm ist PUBLIC DOMAIN, mit den Einschraenkungen durch    #
# die ALAS (Allgemeine Lizenz fuer Amateurfunk Software), entweder     #
# Version 1, veroeffentlicht von Hans Georg Giese (DF2AU),             #
# am 13.Oct.1992, oder (wenn gewuenscht) jede spaetere Version.        #
#                                                                      #
# Dieses Programm wird unter Haftungsausschluss vertrieben, aus-       #
# schliesslich fuer Weiterentwicklungs- und Lehrzwecke. Naeheres       #
# koennen Sie der ALAS (Allgemeine Lizenz fuer Amateurfunk Software)   #
# entnehmen.                                                           #
#                                                                      #
# Sollte dieser Software keine ALAS (Allgemeine Lizenz fuer Amateur-   #
# funk Software) beigelegen haben, wenden Sie sich bitte an            #
# NORD><LINK e.V., Hinter dem Berge 5, D-38108 Braunschweig            #
#                                                                      #
########################################################################

#
# Makefile fuer MSG und MSY / Linux-Version
#

CC		= gcc

WARNINGS	:= -w
WARNINGS	:= -Wall
WARNINGS	+= -Wpointer-arith
WARNINGS	+= -Wcast-qual
WARNINGS	+= -Wcast-align
WARNINGS	+= -Waggregate-return
WARNINGS	+= -Wstrict-prototypes


CFLAGS		:= -pipe -O2 $(WARNINGS)
#CFLAGS		+= -m486
#CFLAGS		+= -g

MAKEFILE	:= makefile

FILES		:= ms[gy]{_lin.c,.his,.inf} msg.{usr,sys} $(MAKEFILE)
TGZ		:= msgmsy.tgz

MSGDIR		:= /usr/local/tnn/msg
SYSEXE		:= /usr/local/tnn/sysexe
USEREXE		:= /usr/local/tnn/userexe

.SUFFIXES:

.SILENT:

.PHONY:		all msg msy clean dist install

all:		msg msy

msg:		msg.exe

msg.exe:	msg_lin.c $(MAKEFILE)
		echo msg
		$(CC) $(CFLAGS) -o msg.exe msg_lin.c

msy:		msy.exe

msy.exe:	msy_lin.c $(MAKEFILE)
		echo msy
		$(CC) $(CFLAGS) -o msy.exe msy_lin.c

clean:
		rm -f msg.exe msy.exe *~ $(TGZ)

dist:
		tar cfz $(TGZ) $(FILES)

install:	all
		mkdir -p $(USEREXE) $(SYSEXE) $(MSGDIR)
		cp msg.exe $(USEREXE)
		cp msy.exe $(SYSEXE)
		cp msg.usr msg.sys $(MSGDIR)
