This repository has been archived by the owner on Sep 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
confignt.pl
67 lines (59 loc) · 1.5 KB
/
confignt.pl
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
#!/usr/bin/perl
# Copyright (C) 1996-2002 by Salvador E. Tropea (SET),
# see copyrigh file for details
#
require "miscperl.pl";
require "conflib.pl";
SeeCommandLine();
# 1) Get the list of files used by djgpp version
$col=14;
$a=ExtractItemsImk('makes/librhtv.imk',$col);
$a.=' '.ExtractItemsImk('compat/compat.imk',$col);
# 2) Remove djgpp specific things
$a=~s/vga.o//;
$a=~s/vgaregs.o//;
$a=~s/vgastate.o//;
$a=~s/vesa.o//;
# 3) Add BC++ specific
#$a.=' gkeyw32.cc';
$b=$a;
$a=~s/(\w+)\.(\w+)/\+$1\.obj/g;
$a=~s/\t//g;
# 3b) MSVC specific
$b=~s/(\w+)\.(\w+)/\$\(OBJDIR\)\/$1\.o/g;
# 4) Generate makefile from the template
$ReplaceTags{'TV_OBJS_BCC'}=$a;
$ReplaceTags{'TV_OBJS_MSVC'}=$b;
$ReplaceTags{'DYNRTL'} = $conf{'dynrtl'} ? "DYNRTL = 1" : "";
ReplaceText('winnt/bccmake.in','winnt/Makefile');
ReplaceText('winnt/msvcmake.in','winnt/Makefile.nmk');
sub SeeCommandLine
{
my $i;
foreach $i (@ARGV)
{
if ($i eq '--help')
{
ShowHelp();
die "\n";
}
elsif ($i eq '--with-dynrtl')
{
$conf{'dynrtl'} = 1;
}
else
{
ShowHelp();
die "Unknown option: $i\n";
}
}
}
sub ShowHelp
{
print "Available options:\n\n";
print "--help : displays this text.\n";
print "--bindir=path : defines the directory where *.exe files will be installed.\n";
print "--setdir=path : defines the directory where documentation andsupport files\n" .
" will be installed.\n";
print "--with-dynrtl : compile with DLL runtime.\n";
}