Commit Graph

1698 Commits

Author SHA1 Message Date
uebayasi 472997e0ab Allow MD to link libraries. Build rules are written in MD makefiles until
config(1) will support library properly.
2015-09-06 02:05:11 +00:00
uebayasi ce4642ec41 Make config(1) output only ${ALLFILES}, selected input files, and pass it to
Makefile.kern.inc, where files are filtered by suffix.
2015-09-04 06:10:47 +00:00
uebayasi bc619545b7 Add generated *.c files (devsw.c and ioconf.c) to ${CFILES} by config(1)
internally.  ${MI_CFILES} in Makefile.kern.inc is no longer needed.
2015-09-03 14:23:52 +00:00
uebayasi 361a961386 Prepare for relative ${MD_OBJS}. 2015-09-03 12:31:16 +00:00
uebayasi eaa72931c4 Move `all' target definition to Makefile.kern.inc. 2015-09-03 09:28:00 +00:00
uebayasi caf44640e0 Kernel depends on swap<kernel>.o too. 2015-09-03 06:24:15 +00:00
uebayasi fc3a975cb5 Sort dependendy to keep alphabetical build order. 2015-09-03 06:10:53 +00:00
uebayasi d891b756ba Define kernel dependency in Makefile.kern.inc. 2015-09-03 06:09:46 +00:00
uebayasi d01cbd6db6 Rename ${COMPILE.c} to ${KCOMPILE.c} to avoid potential conflicts with those
in sys.mk.  Define .go/.po suffix rules.
2015-09-03 04:17:55 +00:00
uebayasi 10a39df2f6 Refactor. 2015-09-03 03:47:25 +00:00
uebayasi 1d638ab7bf Simplify. Wrap long lines. 2015-09-03 01:40:06 +00:00
uebayasi 1587c3fa3a Stop ordering objects alphabetically now that I am sure I can fix fallouts. 2015-09-03 01:30:18 +00:00
uebayasi 185d99e39a Build conf/param.c normally. 2015-09-03 01:09:38 +00:00
uebayasi 4c17ec775b Fix link of kernels whose name don't start with "netbsd*". 2015-09-02 23:03:41 +00:00
uebayasi 350968d06a Build param.c under conf/ using suffix rules in `-S' mode. 2015-09-02 15:35:52 +00:00
uebayasi 4af08e031f Clean up `swap<kernel>.o' handling. 2015-09-02 15:29:23 +00:00
uebayasi 7a8426662a Define ${OBJS} in `Makefile.kern.inc'. Relative paths are not truncated
(a/b/c/x.c -> x.c) in `-S' mode.  Don't provide some explicit rules for `-S'
mode for safety.
2015-09-02 14:17:03 +00:00
uebayasi 558aab1be0 Output relative path for ${CFILES} and ${SFILES} in generated `Makefile'.
`Makefile.kern.inc' knows how to deal with $S prefix, so don't bother it in
config(1).
2015-09-02 13:42:14 +00:00
uebayasi 054cd04942 Add swap<kernel>.o to common ${SYSTEM_LD} as it is always linked. 2015-09-02 12:38:48 +00:00
uebayasi d9bb176d5f Clean up some rules and make them less error prone. 2015-09-02 03:22:41 +00:00
uebayasi 1b2a74aeec Define suffix rules at the end to override system definitions. Provide them
only if ___USE_SUFFIX_RULES___ is defined (config -S).
2015-09-01 23:04:35 +00:00
uebayasi e16ec3ea57 Experimental suffix-rules build (disabled by default). 2015-09-01 16:04:04 +00:00
uebayasi 1effbb59ae Fix "Define compile rules in sys/conf/Makefile.kern.inc ...".
Use `.if !commands(xxx)' to check if `xxx' has a defined, overriden rule,
instead of `.if !targets(xxx)'.  The latter evaluates as true even when `xxx'
has an empty rule to define a dependency.
2015-08-30 21:16:10 +00:00
uebayasi ce0411ffa7 A makeoptions `DEFWARNINGS', forcibly disabling all ${CC} warnings, is only
used by hpcmips's NULLCONF, which doesn't even build for other causes.

If some source doen't build and needs a workaround, that should be deal with
by modifying per-file ${CC} options (e.g. COPTS.foo.c+=-fno-xxx).  Let's not
use DEFWARNINGS any longer.
2015-08-30 14:06:17 +00:00
uebayasi b86d2cc9aa Generate opt_diagnostic.h for DIAGNOSTIC; define unused _DIAGNOSTIC until
thoroughly populated.
2015-08-30 07:52:30 +00:00
uebayasi f5d8ce0f6b Typo. 2015-08-30 07:35:11 +00:00
uebayasi 8e50ed8849 Move splash logic, keep Makefile.kern.inc clean. 2015-08-30 07:33:53 +00:00
uebayasi 5e3f7c3b6d Put back MEMORY_DISK_IMAGE logic, but use generated opt_memory_root_image.h
and don't polute Makefile.kern.inc.
2015-08-30 05:24:03 +00:00
uebayasi 623bd6b2aa Define compile rules in sys/conf/Makefile.kern.inc except those overriden by
"file ... compile-with ...".  As rules are still explicit, be careful to not
override by checking .if !target(xxx.o).
2015-08-30 05:12:00 +00:00
uebayasi c692eec272 Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources. Remove a hack
to set -DCOPY_SYMTAB from sys/conf/Makefile.kern.inc.  Remove unnecessary
dependencies too.
2015-08-30 01:46:02 +00:00
uebayasi 3f77c79895 Move less important part out of Makefile.kern.inc. 2015-08-29 16:27:07 +00:00
uebayasi 46effbfc86 Revert a mistakenly added file. 2015-08-29 16:10:01 +00:00
uebayasi ac62c32d4d Define two suffix rules, .c -> .o and .S -> .o, using ${NORMAL_C} and
${NORMAL_S} respectively.  Use the .c rule to build devsw.c, ioconf.c, and
param.c.  Other .c/.S files have explicit rules in the generated `Makefile',
and unaffected.
2015-08-29 16:07:07 +00:00
uebayasi 43d2d6ab0b Now that MAXUSERS is in opt_param.h, param.o doesn't depend on Makefile. 2015-08-29 15:58:38 +00:00
uebayasi eee4f24ac6 According to nxr.netbsd.org, nothing uses MEMORY_DISK_IMAGE. Retire it.
Premature design and its build rule bloats Makefile.kern.inc.  There are
other ways like MEMORY_DISK_DYNAMIC.

(When kernel will be built as relocatable, embedding binary data will be much
easier, and md(4), splash(4), and ksyms(4) will all benefit.)
2015-08-29 15:51:53 +00:00
uebayasi c0c2ceb91f genassym.cf and machdep.c are _KERNEL_OPT'ed, don't depend on Makefile. 2015-08-29 15:37:18 +00:00
uebayasi d9fd5c1975 conf.c doesn't exist.
autoconf.c exists, but it's just a C file, no need to depend on Makefile.
2015-08-29 15:06:35 +00:00
uebayasi aaedd29630 I don't see how uipc_proto.c can change its content by Makefile, don't depend
on Makefile.  vfs_conf.c doesn't even exist, remove it too.
2015-08-29 14:43:38 +00:00
uebayasi 75298111a7 Convert MAXUSERS, take 2.
Define MAXUSERS in opt_param.h and include it from sys/param.h, for more
accurate dependency.  Don't define -DMAXUSERS and add it to ${CPPFLAGS}.
config(5)'s "maxusers" syntax doesn't change.

(The version just before revert was OK, but I had something bad in my obj
dirs.)
2015-08-29 14:07:45 +00:00
uebayasi 9d7c5e580c Revert MAXUSERS changes. Need fresh air. 2015-08-29 07:33:18 +00:00
uebayasi 4401376950 Define MAXUXERS in opt_param.h. Bump config(1) version. 2015-08-29 07:08:38 +00:00
uebayasi aeabb302e9 Comment. 2015-08-29 05:03:36 +00:00
uebayasi 5c3e77010e Define some suffix rules. Not used and harmless, because all rules are
explicit now.
2015-08-29 05:02:43 +00:00
uebayasi ba2a0d3e7c Specify explicit output (-o) to ${LINT} too. 2015-08-29 04:46:27 +00:00
uebayasi c74142254f Specifiy explicit output (-o) to ${CC}. 2015-08-29 04:43:05 +00:00
uebayasi 0d89ac2159 netbsd depends on $S/kern/kern_ksyms_buf.c; rarely updated but better safe. 2015-08-27 06:28:09 +00:00
uebayasi d6cc60697d Tweak previous. 2015-08-27 03:20:13 +00:00
uebayasi 33dfd38556 Echo exact objects (swap*.o etc.) when linking kernel. 2015-08-27 03:17:46 +00:00
uebayasi 54882650b0 Have MI genassym.cf. 2015-08-26 03:00:52 +00:00
uebayasi 282cd20ff5 Don't allow MD to override the assym.h generation rule.
(Nothing defines it except i386/bioscall/Makefile, but it is not part of
kernel build.)
2015-08-26 02:54:09 +00:00