###############################################################################
#
# $Id: Makefile,v 2.6.14.3 2013/06/19 12:25:13 ronald Exp $
#
# copyright (c) 2002 topIT Informationstechnologie GmbH
# all rights reserved
#
###############################################################################

# disable this for production
# DEBUG=DEBUG

# test for "GNU Make"
ifneq (,)
This makefile requires GNU Make.
endif

ifndef OSTYPE
OSTYPE := $(shell uname | tr '[A-Z]' '[a-z]')
endif

ifeq ($(OSTYPE),linux)
        LINUX=1
else
        ifeq ($(OSTYPE),netbsdelf)
                NETBSD=1
        else
                ifeq ($(OSTYPE),sunos)
                        SOLARIS=1
                else
                        $(error UNKNOWN OPERATING SYSTEM $(OSTYPE))
                endif
        endif
endif

SUBDIRS = .

EXEC = $(SDMSHOME)/bin/simplesc.exe

DISTRIB = $(EXEC)

.PHONY: all generate subdirs distrib clean new

all: generate osstrip subdirs distrib

generate: commongensubdirs

subdirs: commonsubdirs

distrib: $(DISTRIB)

clean: commonclean
	-rm -f $(EXEC) *.o

new: clean all

include $(SDMSHOME)/src/Makefile.CommonRules

$(EXEC): simplesc.c
	$(MINGWGCC) -DWINDOWS $< -o $@
