summaryrefslogtreecommitdiff
path: root/Makeconf
blob: 5df37f3baa10a014c6e8ee0101af3e7973fe1243 (plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Generic configuration for Hurd compilation

all:

# This is the directory into which Hurd cross-building tools are placed
hurdinst := /home/gd3/hurdinst

# This is the directory which serves as root for the Hurd.
hostname := $(shell hostname)
hurdroot-douglas.gnu.ai.mit.edu = /home/hm2/hurdroot
hurdroot-ernst.gnu.ai.mit.edu = /home/hm1/hurdroot
hurdroot := $(hurdroot-$(hostname))

# This is the device with the filesystem mounted as $(hurdroot)
hurdrootdev := /dev/hd0f

# This is the directory containing the top-level Hurd source (and this file).
hurdsource := /home/gd3/gnu/hurd

# Where to find various things for compilation:
includedir := $(hurdinst)/include
startup := $(hurdinst)/lib/crt0.o
libc := $(patsubst %,$(hurdinst)/lib/lib%.a,c machuser hurduser c hurduser)
libthreads := $(hurdinst)/lib/libthreads.a
libports := $(hurdinst)/lib/libports.a
libioserver := $(hurdinst)/lib/libioserver.a
libpager := $(hurdinst)/lib/libpager.a
libfshelp := $(hurdinst)/lib/libfshelp.a
libdiskfs := $(hurdinst)/lib/libdiskfs.a
libtrivfs := $(hurdinst)/lib/libtrivfs.a

# Finding binaries
include $(hurdsource)/Maketools

# Flags for compilation.  It is important to have -I. first for things that
# use their own headers which are later installed; they might do `#include
# <foo.h>' and that ignores the current directory.
CPPFLAGS := -I. 
CFLAGS := -Wall -Wno-parentheses -g

# Mounting $(hurdroot)
ifeq ($(hurdroot),)
$(hurdroot): force
	@echo Cannot do install on this machine.
	false
else
$(hurdroot): $(hurdroot)/mounted
$(hurdroot)/mounted:
	fsck -p $(hurdrootdev)
	mount $(hurdrootdev)
endif


# Making a snapshot

lndist: $(DIST_FILES) $(hurdsource)/hurd-snap/$(dir) FORCE
	ln $(DIST_FILES) $(hurdsource)/hurd-snap/$(dir)
 
ifeq ($(dir),.)
$(hurdsource)/hurd-snap/$(dir):
else
$(hurdsource)/hurd-snap/$(dir):
	mkdir $(hurdsource)/hurd-snap/$(dir)
endif


# TAGS files

ifneq ($(dir),.)
TAGS: $(SRCS) $(TAGSHDRS)
	etags -o $@ $(addprefix -i ,$(addsuffix /TAGS,$(addprefix ../,$(TAGSLIBS)))) $(SRCS) $(TAGSHDRS)
endif

# Dependencies for building libraries

ifneq ($(strip $(dir)),libports)
$(libports): FORCE
	$(MAKE) -C $(hurdsource)/libports $(libports)
$(includedir)/hurd/ports.h: FORCE
	$(MAKE) -C $(hurdsource)/libports $(includedir)/hurd/ports.h
endif

ifneq ($(strip $(dir)),libioserver)
$(libioserver): FORCE
	$(MAKE) -C $(hurdsource)/libioserver $(libioserver)
$(includedir)/hurd/ioserver.h: FORCE
	$(MAKE) -C $(hurdsource)/libioserver $(includedir)/hurd/ioserver.h
endif

ifneq ($(strip $(dir)),libpager)
$(libpager): FORCE
	$(MAKE) -C $(hurdsource)/libpager $(libpager)
$(includedir)/hurd/pager.h: FORCE
	$(MAKE) -C $(hurdsource)/libpager $(includedir)/hurd/pager.h
endif

ifneq ($(strip $(dir)),libdiskfs)
$(libdiskfs): FORCE
	$(MAKE) -C $(hurdsource)/libdiskfs $(libdiskfs)
$(includedir)/hurd/diskfs.h: FORCE
	$(MAKE) -C $(hurdsource)/libdiskfs $(includedir)/hurd/diskfs.h
endif

ifneq ($(strip $(dir)),libfshelp)
$(libfshelp): FORCE
	$(MAKE) -C $(hurdsource)/libfshelp $(libfshelp)
$(includedir)/hurd/fshelp.h: FORCE
	$(MAKE) -C $(hurdsource)/libfshelp $(includedir)/hurd/fshelp.h
endif

ifneq ($(strip $(dir)),libtrivfs)
$(libtrivfs): FORCE
	$(MAKE) -C $(hurdsource)/libtrivfs $(libtrivfs)
$(includedir)/hurd/trivfs.h: FORCE
	$(MAKE) -C $(hurdsource)/libtrivfs $(includedir)/hurd/trivfs.h
endif

ifneq ($(strip $(dir)),libthreads)
$(libthreads): FORCE
	$(MAKE) -C $(hurdsource)/libthreads $(libthreads)
$(includedir)/cthreads.h: FORCE
	$(MAKE) -C $(hurdsource)/libthreads $(includedir)/cthreads.h
$(includedir)/machine/cthreads.h: FORCE
	$(MAKE) -C $(hurdsource)/libthreads $(includedir)/machine/cthreads.h
endif

FORCE: