#
# $PROJECT: htdemo.datatype DataType demonstrating hypertext.datatype features
#
# $VER: Makefile 40.2 (15.09.96)
#
# by
#
# Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
#
# (C) Copyright 1996
# All Rights Reserved !
#
# $HISTORY:
#
# 15.09.96 : 040.002 : removed asm, added new c dependencies
# 08.09.96 : 040.001 : initial
#

NAME       = htdemo
DTYPE      = $(NAME).datatype
CREVFILE   = $(NAME)_rev.h

DATATYPE   = $(DTYPE)
DTYPEDEST  = Sys:Classes/DataTypes

HEADER     = classbase.h classdata.h

SRCS       = classbase.c dispatch.c
OBJS       = gnu/classbase.o gnu/dispatch.o

DIRS       = gnu

CC         = gcc

##############################################################################
#
# makedoc definitions
#

AUTODOC    = /doc/$(NAME)_dtc.doc
GUIDE      = /help/$(NAME)_dtc

MDOCFLAGS  = TOC VERBOSE TABS=3 CONVERTCOMMENTS

##############################################################################
#
# GNU definition
#
# But currently not supported, there are some bugs. So I don't included this
# in the distribution.
#

GCCDEBUG    =
GCCOPTS     = -Wall -I../misc -I/objs/$(SHORTNAME) -noixemul
GCCOPTIMIZE = -m68000 -O2
LDOPTS      = -s -noixemul -lamiga


all: $(DIRS) gnu/$(DATATYPE)

gnu/$(DATATYPE) : $(OBJS)
	$(CC) $^ -o $@ -nostartfiles $(LDOPTS)

gnu/%.o: %.c
	$(CC) $(GCCOPTS) $(GCCDEBUG) $(GCCOPTIMIZE) $< -c -o $@

##############################################################################
#
# documentation
#

documentation: $(AUTODOC) $(GUIDE)


##############################################################################
#
# explicit dependencies
#

$(OBJDIR)/classbase.o: $(CREVFILE)      # revision dependency

$(OBJS): $(HEADER)                      # header dependency

##############################################################################
#
# clean up
#

clean:
	rm -rf gnu/

$(DIRS):
	mkdir $@

