# Generic configuration for Hurd compilation all: # This is the directory into which Hurd cross-building tools are placed hurdinst := /home/hm1/hurdinst # This is the directory which serves as root for the Hurd. hurdroot := /home/hm1/hurdroot # This is the directory containing the top-level Hurd source (and this file). hurdsource := /home/hm1/gnu/hurd # Where to find various things for compilation: headers := $(hurdinst)/include startup := $(hurdinst)/lib/crt0.o libc := $(hurdinst)/lib/libc.a libthreads := $(hurdinst)/lib/libthreads.a libports := $(hurdinst)/lib/libports.a libioserver := $(hurdinst)/lib/libioserver.a gccheaders := /usr/local/lib/gcc-lib/i386-compaq-mach/2.5.7/include # Flags for compilation CPPFLAGS := -nostdinc -I$(headers) -I$(gccheaders) CFLAGS := -Wall -Wno-parentheses -O -g # Finding binaries CC=gcc MIGCOM=/usr/local/lib/migcom CPP=/usr/local/lib/gcc-lib/i386-compaq-mach/2.4.5/cpp MIG=mig # How to do some things: ldflags = $(addprefix -Xlinker ,$(LDFLAGS)) # $(link) uses threads to get malloc until the one in the library is fixed. define link $(CC) -nostdlib -e __start $(ldflags) -o $@ $(CFLAGS) $(startup) \ $^ $(libthreads) $(libc) -lgcc endef # Making a snapshot lndist: $(DIST_FILES) $(hurdsource)/hurd-snap/$(dir) ln $(DIST_FILES) $(hurdsource)/hurd-snap/$(dir) ifeq ($(dir),.) $(hurdsource)/hurd-snap/$(dir): else $(hurdsource)/hurd-snap/$(dir): mkdir $(hurdsource)/hurd-snap/$(dir) endif # Some very useful dependencies ifneq ($(strip $(dir)),libports) $(libports): FORCE $(MAKE) -C $(hurdsource)/libports $(libports) $(headers)/libports.h: FORCE $(MAKE) -C $(hurdsource)/libports $(headers)/libports.h endif ifneq ($(strip $(dir)),libioserver) $(libioserver): FORCE $(MAKE) -C $(hurdsource)/libioserver $(libioserver) $(headers)/libioserver.h: FORCE $(MAKE) -C $(hurdsource)/libioserver $(headers)/libioserver.h endif FORCE: