[go: up one dir, main page]

Menu

[2e205f]: / Makefile  Maximize  Restore  History

Download this file

109 lines (82 with data), 2.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
#
# Dos9 Makefiles, The Dos9 project
# Copyright (C) 2012-2018 Romain Garbi, Teddy Astie
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
#
ifneq (,$(wildcard ./femto-config.mk))
include femto-config.mk
endif
BINDIR ?= bin
SUBDIRS_ADD ?=
SUBDIR_PO =
ifeq ($(use_libcu8),1)
SUBDIRS_ADD = libcu8
endif
ifeq ($(use_nls),1)
SUBDIR_PO = po
endif
SUBDIRS = libDos9 libinteval libmatheval $(SUBDIRS_ADD) dos9 dos9ize dump tea \
scripts modules $(SUBDIR_PO)
TEAFILES = README.tea WHATSNEW.tea GUIDELINES.tea THANKS.tea
TEXTFILES = $(TEAFILES:.tea=.txt)
MDFILES = $(TEAFILES:.tea=.md)
SUBDIRS_CLEAN := $(addsuffix .clean,$(SUBDIRS))
SUBDIRS_BIN := $(addsuffix .bin,$(SUBDIRS))
HOST = $(shell $(CC) -dumpmachine)
YEAR = $(shell date +%Y)
PACKAGE = dos9
PACKAGE_URL = http://dos9.org
PACKAGE_BUGREPORT = darkbatcher@dos9.org
VERSION = 218.2
all: $(SUBDIRS) $(MDFILES)
$(SUBDIRS):
$(MAKE) -C $@
clean: $(SUBDIRS_CLEAN)
rm -f $(TEXTFILES)
rm -rf $(BINDIR)
$(SUBDIRS_CLEAN):
$(MAKE) -C $(basename $@) clean
bin: bindir $(SUBDIRS_BIN)
dist: bin
tar zcf dos9-$(VERSION).tar.gz $(BINDIR)
git-dist: bin
tar zcf dos9-$(VERSION)-`git rev-parse --short HEAD`.tar.gz $(BINDIR)
bindir: $(TEXTFILES)
mkdir -p $(BINDIR)
mkdir -p $(BINDIR)/cmd
cp $(TEXTFILES) $(BINDIR)/
cp COPYING* $(BINDIR)/
textfiles: $(TEXTFILES)
doc.md: README.tpl
tea/tea -e:utf-8 -o:md README.tpl doc.md
.tpl.tea:
cat $< | sed -e s,\{doc[^}]*\|,\{,g > $@
.tea.txt:
tea/tea -e:utf-8 -o:text-plain $< $@
.tea.md:
tea/tea -e:utf-8 -o:md $< $@
$(SUBDIRS_BIN): $(SUBDIRS)
$(MAKE) -C $(basename $@) bin || true
# stuff to check
PROGRAMS = mimeopen xdg-open
FUNCTIONS = WIN32
LIBS = iconv intl pthread m
OPTIONS = libcu8 nls cmdlycorrect console
DEFAULTOPTIONS = no-libcu8 use-nls no-cmdlycorrect use-console
SUBCONFIG = libcu8 libmatheval
ADDITIONALVARS = HOST BINDIR YEAR VERSION PACKAGE PACKAGE_URL PACKAGE_BUGREPORT
include femto.mk
.PHONY: all bin bindir clean $(SUBDIRS) $(SUBDIRS_CLEAN) textfiles dist
.SUFFIXES: .tea .txt .md .tpl