diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-07-22 19:39:31 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-07-22 19:39:31 +0000 |
commit | 13e79a775e871248e86fd221bb8977091c4f87a0 (patch) | |
tree | d57530acadd4c97fb321501b12924e375fd56965 /Makeconf | |
parent | 9d9852a73017c17a76e350032a99656f47f0b5e5 (diff) |
Formerly Makeconf.~49~
Diffstat (limited to 'Makeconf')
-rw-r--r-- | Makeconf | 85 |
1 files changed, 59 insertions, 26 deletions
@@ -65,28 +65,28 @@ libc := $(patsubst %,$(hurdinst)/lib/lib%.a,c machuser hurduser c hurduser) ifeq ($(makemode),server) doinst := one - installationdir := $(hurdinst)/hurd + installationdir := $(hurdroot)/hurd clean := yes cleantarg := $(target) endif ifeq ($(makemode),utility) doinst := one - installationdir := $(hurdinst)/bin + installationdir := $(hurdroot)/bin clean := yes cleantarg := $(target) endif ifeq ($(makemode),servers) doinst := many - installationdir := $(hurdinst)/hurd + installationdir := $(hurdroot)/hurd clean := yes cleantarg := $(targets) endif ifeq ($(makemode),utilities) doinst := many - installationdir := $(hurdinst)/bin + installationdir := $(hurdroot)/bin clean := yes cleantarg := $(targets) endif @@ -106,6 +106,8 @@ libpager := $(hurdsource)/libpager/libpager.a libfshelp := $(hurdsource)/libfshelp/libfshelp.a libdiskfs := $(hurdsource)/libdiskfs/libdiskfs.a libtrivfs := $(hurdsource)/libtrivfs/libtrivfs.a +alllibs := libthreads libports libioserver libpager libfshelp libdiskfs\ + libtrivfs # Finding binaries include $(hurdsource)/Maketools @@ -148,13 +150,14 @@ install: # Yippee! A use for computed variable references! ifeq ($(doinst),one) $(target): $(OBJS) $($(HURDLIBS)) $(OTHERLIBS) -# $(CC) $(CFLAGS) -o $(target) $^ + $(CC) $(CFLAGS) -o $(target) $(OBJS) $($(HURDLIBS)) $(OTHERLIBS) endif ifeq ($(makemode),library) $(libname).a: $(OBJS) rm -f $(libname).a $(AR) r $@ $^ + $(RANLIB) $@ endif # Making a snapshot @@ -171,8 +174,8 @@ endif # TAGS files ifneq ($(dir),.) -TAGS: $(SRCS) $(LCLHDRS) $(REMHDRS) - etags -o $@ $(addprefix -i ,$(addsuffix /TAGS,$(addprefix ../,$(HURDLIBS)))) $(SRCS) $(LCLHDRS) $(REMHDRS) +TAGS: $(SRCS) $(LCLHDRS) $(REMHDRS) $(OTHERTAGS) + etags -o $@ $(addprefix -i ,$(addsuffix /TAGS,$(addprefix ../,$(HURDLIBS)))) $(SRCS) $(LCLHDRS) $(REMHDRS) $(OTHERTAGS) endif @@ -194,7 +197,7 @@ relink: # Mounting $(hurdroot) ifeq ($(hurdroot),) -$(hurdroot): force +$(hurdroot): FORCE @echo Cannot do install on this machine. false else @@ -205,23 +208,29 @@ $(hurdroot)/mounted: endif # Building Hurd libraries -$(hurdsource)/lib%/lib%.a: FORCE +$(foreach lib,$(alllibs),$(hurdsource)/$(lib)/%.a): FORCE $(MAKE) -C $(dir $@) $(notdir $@) # How to build RPC stubs +# MIGSFLAGS is provided to CPP when building server stubs and header files. +# fooMIGSFLAGS is provided to CPP which building server stubs and header files +# for interface `foo'. +# MIGCOMSFLAGS is provided to MiG when building server stubs and header files. +# CPPFLAGS is provided to CPP always. + # Server stubs from Hurd interfaces hurddefs := $(notdir $(basename $(wildcard $(hurdsource)/hurd/*.defs))) ht := $(hurdsource)/hurd/hurd_types.defs $(addsuffix _S.h,$(hurddefs)): %_S.h: $(hurdsource)/hurd/%.defs $(ht) - $(CPP) $(CPPFLAGS) $(MIGSFLAGS) -DSERVERPREFIX=S_ $(hurdsource)/hurd/$*.defs \ - | $(MIGCOM) -sheader $*_S.h -user /dev/null -server /dev/null -header /dev/null + $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*MIGSFLAGS) -DSERVERPREFIX=S_ $(hurdsource)/hurd/$*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -sheader $*_S.h -user /dev/null -server /dev/null -header /dev/null $(addsuffix Server.c,$(hurddefs)): %Server.c: $(hurdsource)/hurd/%.defs $(ht) - $(CPP) $(CPPFLAGS) $(MIGSFLAGS) -DSERVERPREFIX=S_ $(hurdsource)/hurd/$*.defs \ - | $(MIGCOM) -user /dev/null -header /dev/null -server $*Server.c + $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*MIGSFLAGS) -DSERVERPREFIX=S_ $(hurdsource)/hurd/$*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -user /dev/null -header /dev/null -server $*Server.c # User stubs from Hurd interfaces @@ -237,26 +246,26 @@ $(addsuffix User.c,$(hurddefs)): %User.c: $(hurdsource)/hurd/%.defs $(ht) | $(MIGCOM) -user $*User.c -server /dev/null -header $*_U.h # Server stubs from Mach interfaces -machdefs := notify +machdefs := notify memory_object $(addsuffix _S.h,$(machdefs)): %_S.h: $(includedir)/mach/%.defs - $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $(includedir)/mach/$*.defs \ - | $(MIGCOM) -sheader $*_S.h -user /dev/null -server /dev/null -header /dev/null + $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*MIGSFLAGS) $(includedir)/mach/$*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -sheader $*_S.h -user /dev/null -server /dev/null -header /dev/null $(addsuffix Server.c,$(machdefs)): %Server.c: $(includedir)/mach/%.defs - $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $(includedir)/mach/$*.defs \ - | $(MIGCOM) -user /dev/null -header /dev/null -server $*Server.c + $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*MIGSFLAGS) $(includedir)/mach/$*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -user /dev/null -header /dev/null -server $*Server.c # User stubs from Mach interfaces # Build a .c file to avoid confusion (due to the need to build # a header file in the following rule). -$(addsuffix _U.h,$(machdefs)): %_U.h: $(includedir)/mach/%.defs $(ht) +$(addsuffix _U.h,$(machdefs)): %_U.h: $(includedir)/mach/%.defs $(CPP) $(CPPFLAGS) $(includedir)/mach/$*.defs \ | $(MIGCOM) -user $*User.c -server /dev/null -header $*_U.h # We have to build a header file because otherwise MiG ignores the imports -$(addsuffix User.c,$(machdefs)): %User.c: $(includedir)/mach/%.defs $(ht) +$(addsuffix User.c,$(machdefs)): %User.c: $(includedir)/mach/%.defs $(CPP) $(CPPFLAGS) $(includedir)/mach/$*.defs \ | $(MIGCOM) -user $*User.c -server /dev/null -header $*_U.h @@ -264,28 +273,52 @@ $(addsuffix User.c,$(machdefs)): %User.c: $(includedir)/mach/%.defs $(ht) devicedefs := device_reply device $(addsuffix _S.h,$(devicedefs)): %_S.h: $(includedir)/device/%.defs - $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $(includedir)/device/$*.defs \ - | $(MIGCOM) -sheader $*_S.h -user /dev/null -server /dev/null -header /dev/null + $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*MIGSFLAGS) $(includedir)/device/$*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -sheader $*_S.h -user /dev/null -server /dev/null -header /dev/null $(addsuffix Server.c,$(devicedefs)): %Server.c: $(includedir)/device/%.defs - $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $(includedir)/device/$*.defs \ - | $(MIGCOM) -user /dev/null -header /dev/null -server $*Server.c + $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*MIGSFLAGS) $(includedir)/device/$*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -user /dev/null -header /dev/null -server $*Server.c # User stubs from Mach device interfaces # Build a .c file to avoid confusion (due to the need to build # a header file in the following rule). -$(addsuffix _U.h,$(devicedefs)): %_U.h: $(includedir)/device/%.defs $(ht) +$(addsuffix _U.h,$(devicedefs)): %_U.h: $(includedir)/device/%.defs $(CPP) $(CPPFLAGS) $(includedir)/device/$*.defs \ | $(MIGCOM) -user $*User.c -server /dev/null -header $*_U.h # We have to build a header file because otherwise MiG ignores the imports -$(addsuffix User.c,$(devicedefs)): %User.c: $(includedir)/device/%.defs $(ht) +$(addsuffix User.c,$(devicedefs)): %User.c: $(includedir)/device/%.defs $(CPP) $(CPPFLAGS) $(includedir)/device/$*.defs \ | $(MIGCOM) -user $*User.c -server /dev/null -header $*_U.h +# Server stubs from local interfaces + +%_S.h: %.defs + $(CPP) $(CPPFLAGS) $($*MIGSFLAGS) $(MIGSFLAGS) $*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -sheader $*_S.h -user /dev/null -server /dev/null -header /dev/null + +%Server.c: %.defs + $(CPP) $(CPPFLAGS) $($*MIGSFLAGS) $(MIGSFLAGS) $*.defs \ + | $(MIGCOM) $(MIGCOMSFLAGS) -user /dev/null -header /dev/null -server $*Server.c + +# User stubs from local interfaces + +# Build a .c file to avoid confusion (due to the need to build +# a header file in the following rule). +%_U.h: %.defs + $(CPP) $(CPPFLAGS) $*.defs \ + | $(MIGCOM) -user $*User.c -server /dev/null -header $*_U.h + +# We have to build a header file because otherwise MiG ignores the imports +%User.c: %.defs + $(CPP) $(CPPFLAGS) $*.defs \ + | $(MIGCOM) -user $*User.c -server /dev/null -header $*_U.h + + FORCE: |