[ucsim] Implement [features:#769] Check writeability of output file when uart sends
[sdcc.git] / sdcc-build / lib / variables.mk
blob3d1a7a3918af00df0d1a1ea39f54a1ed283c01c8
1 # List of all source trees that need to be fetched either locally or from Subversion
2 SRCTREES +=
3 # Top build directory
4 TOPDIR := $(shell /bin/pwd)
5 # Local host type.
6 HOSTOS := $(shell $(TOPDIR)/support/config.guess)
7 # Target to build for.
8 TARGETOS = $(HOSTOS)
9 # Target platform name equals to target OS name by default
10 TARGET_PLATFORM = $(TARGETOS)
11 # By default compile for the host.
12 TOOLSPREFIX =
13 # Extract the host name without domain to $(HOSTNAME)
14 HOSTNAME := $(shell if [ $(shell expr $(shell hostname) : '.*\.') != '0' ]; then expr $(shell hostname) : '\([^.]*\).'; else echo $(shell hostname); fi)
15 # Path to the makensis binary
16 NSISBIN = $(HOME)/local-$(HOSTNAME)/bin
17 # Get build date
18 BUILDDATE := $(shell date +%Y%m%d)
19 # Stamp to append to the build name
20 SNAPSHOTID = $(BUILDDATE)-$(SDCC_REVISION)
22 # Path to the directory containing local machine makefiles (<hosatname>.mk)
23 # $(HOME)/build/sdcc-build/local is used if the path doesn't exist
24 LOCAL_MK = $(HOME)/.sdcc_builder/local
26 # DCF server host, user and path
27 # dcfhub2.ivorytower.norman.ok.us
28 DCFHOST = 108.59.196.102
29 DCFPORT = 22
30 DCFUSER = $(HOSTNAME)
31 DCFHTDOCSDIR = /home/$(HOSTNAME)/htdocs/
33 # Machine to ssh into to send the build result out via email
34 BOOTSTRAPSSHMAILSERVER =
36 # default prefix
37 PREFIX = /usr/local
38 # default host prefix if cross compiling
39 HOSTPREFIX = /usr/local
41 # Directory that all of the soure trees get copied into
42 SRCDIR = $(TOPDIR)/$(TARGET_PLATFORM).build
43 ORIGDIR = $(HOME)/build/sdcc-build/orig
44 BUILDDIR = $(TOPDIR)/build/$(TARGET_PLATFORM)/sdcc
45 BINDIR = $(BUILDDIR)/bin
46 STAGINGBASE = $(TOPDIR)/..
47 HTDOCSDIR = $(STAGINGBASE)/htdocs
48 SNAPSHOTDIR = $(HTDOCSDIR)/snapshots
50 # Name of the machine used for fetching svn tree; empty for the local machine
51 SVNSERVER =
53 # Subversion repository root url
54 SVN_ROOT = svn://svn.code.sf.net/p/sdcc/code
56 # Regression test targets. To help reduce the load on the slower systems of the DCF, the
57 # test targets are broken up into four categories:
59 # REGTESTTARGETS_1_0: These will always be tested
60 # REGTESTTARGETS_2_0: These will be tested on (day mod 3)==0
61 # REGTESTTARGETS_2_1: These will be tested on (day mod 3)==1
62 # REGTESTTARGETS_2_2: These will be tested on (day mod 3)==2
64 # Individual machines can opt to test all ports each day by overwriting REGTESTARGETS with FULL_REGTESTTARGETS and CROSSREGTESTTARGETS with FULL_CROSSREGTESTTARGETS in their $(HOSTNAME).mk
65 REGTESTTARGETS_1_0 = test-ds390
66 REGTESTTARGETS_2_0 = test-mcs51-medium test-mcs51-small-stack-auto test-hc08 test-ucz80 test-ez80-z80 test-ucr800 test-ucr2ka test-stm8-large test-pdk15-stack-auto test-uc6502
67 REGTESTTARGETS_2_1 = test-mcs51-small test-mcs51-large-stack-auto test-s08 test-ucz80-resiy test-ucz180 test-ucz80-undoc test-ucz80-unsafe-read test-ucr2k test-stm8 test-pdk15 test-uc65c02
68 REGTESTTARGETS_2_2 = test-mcs51-large test-mcs51-huge test-s08-stack-auto test-ucz80n test-ucz180-resiy test-ucgbz80 test-tlcs90 test-ucr3ka test-pdk14 # test-uc6502-stack-auto enable when it passes
69 DAYMOD = $(shell date +%j | awk '{print $$0%3}')
70 ifeq ($(strip $(DAYMOD)),0)
71 THIRD_CROSSREGTESTTARGETS = $(REGTESTTARGETS_1_0) $(REGTESTTARGETS_2_0)
72 else ifeq ($(strip $(DAYMOD)),1)
73 THIRD_CROSSREGTESTTARGETS = $(REGTESTTARGETS_1_0) $(REGTESTTARGETS_2_1)
74 else
75 THIRD_CROSSREGTESTTARGETS = $(REGTESTTARGETS_1_0) $(REGTESTTARGETS_2_2)
76 endif
77 THIRD_REGTESTTARGETS = test-host $(THIRD_CROSSREGTESTTARGETS)
78 FULL_CROSSREGTESTTARGETS = $(REGTESTTARGETS_1_0) $(REGTESTTARGETS_2_0) $(REGTESTTARGETS_2_1) $(REGTESTTARGETS_2_2)
79 FULL_REGTESTTARGETS = test-host $(FULL_CROSSREGTESTTARGETS)
80 CROSSREGTESTTARGETS = $(THIRD_CROSSREGTESTTARGETS)
81 REGTESTTARGETS = $(THIRD_REGTESTTARGETS)
83 # Directory for regression test log file
84 REGTESTDIR = $(HTDOCSDIR)/regression_test_results/$(TARGET_PLATFORM)
85 # Regression test log file
86 REGTESTLOG = $(REGTESTDIR)/regression-test-$(TARGET_PLATFORM)-$(SNAPSHOTID).log
88 # Directory for regression test log file
89 CHLOGDIR = $(HTDOCSDIR)/changelog_heads
90 # Regression test log file
91 CHLOGTXT = $(CHLOGDIR)/changelog-head-$(SDCC_REVISION).txt
93 SVNFLAGS += --force
94 STAMPDIR = $(ORIGDIR)/../stamps
95 RSYNCFLAGS = -C -r
96 # Passed on to Makes to make them silent. Can override.
97 MAKESILENTFLAG = -s
99 # The file naming and output directories depend on whether this is a
100 # release or a snapshot build
101 ifeq ($(ISRELEASE),true)
102 # Format is staging/sdcc-version-target.tar.bz2
103 # The tail part of the tar ball name
104 BUILDNAME = $(RELEASEVERSION)-$(TARGET_PLATFORM)
105 # The root directory that the tarballs will go into
106 TARBALLBASE = staging
107 # The directory that the tarballs will finally go into
108 TARBALLDIR = $(STAGINGBASE)/$(TARBALLBASE)
109 else
110 # Format is snapshots/target/sdcc-target-date-revision.tar.bz2
111 BUILDNAME = snapshot-$(TARGET_PLATFORM)-$(SNAPSHOTID)
112 TARBALLBASE = snapshots
113 TARBALLDIR = $(SNAPSHOTDIR)/$(TARGET_PLATFORM)
114 endif
116 # dos utils
117 UNIX2DOS := $(shell if test -x /usr/bin/unix2dos -o -x $(HOME)/local-$(HOSTNAME)/bin/unix2dos; then echo unix2dos; else echo todos; fi)
119 $(STAMPDIR):
120 mkdir -p $(STAMPDIR)
122 $(ORIGDIR):
123 mkdir -p $(ORIGDIR)
125 $(SRCDIR):
126 mkdir -p $(SRCDIR)
128 dirs: $(STAMPDIR) $(ORIGDIR) $(SRCDIR)