| 1 |
# GNU -*-Makefile-*- to build GNU Make on MS-DOS with DJGPP |
| 2 |
# |
| 3 |
# MS-DOS overrides for use with Basic.mk. |
| 4 |
# |
| 5 |
# Copyright (C) 2017-2023 Free Software Foundation, Inc. |
| 6 |
# This file is part of GNU Make. |
| 7 |
# |
| 8 |
# GNU Make is free software; you can redistribute it and/or modify it under |
| 9 |
# the terms of the GNU General Public License as published by the Free Software |
| 10 |
# Foundation; either version 3 of the License, or (at your option) any later |
| 11 |
# version. |
| 12 |
# |
| 13 |
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY |
| 14 |
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 15 |
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
| 16 |
# details. |
| 17 |
# |
| 18 |
# You should have received a copy of the GNU General Public License along with |
| 19 |
# this program. If not, see <https://www.gnu.org/licenses/>. |
| 20 |
|
| 21 |
OBJEXT = o |
| 22 |
EXEEXT = .exe |
| 23 |
|
| 24 |
CC = gcc |
| 25 |
|
| 26 |
# Translate a POSIX path into a Windows path. Don't bother with drives. |
| 27 |
# Used only inside recipes, with DOS/CMD tools that require it. |
| 28 |
P2W = $(subst /,\,$1) |
| 29 |
|
| 30 |
prog_SOURCES += $(loadavg_SOURCES) $(glob_SOURCES) |
| 31 |
|
| 32 |
BUILT_SOURCES += $(lib)alloca.h $(lib)fnmatch.h $(lib)glob.h |
| 33 |
|
| 34 |
INCLUDEDIR = c:/djgpp/include |
| 35 |
LIBDIR = c:/djgpp/lib |
| 36 |
LOCALEDIR = c:/djgpp/share |
| 37 |
|
| 38 |
MKDIR.cmd = command.com /c mkdir $(call P2W,$1) |
| 39 |
RM.cmd = command.com /c del /F /Q $(call P2W,$1) |
| 40 |
CP.cmd = command.com /c copy /Y $(call P2W,$1 $2) |
| 41 |
|
| 42 |
$(OUTDIR)src/config.h: $(SRCDIR)/src/configh.dos |
| 43 |
$(call CP.cmd,$<,$@) |