mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
More sensible dependencies scheme for configuration
svn path=/trunk/; revision=1785
This commit is contained in:
parent
78232dab8b
commit
33267a7bd2
5 changed files with 49 additions and 28 deletions
|
@ -4,4 +4,6 @@ ntoskrnl.coff
|
||||||
objects
|
objects
|
||||||
temp.exp
|
temp.exp
|
||||||
depends
|
depends
|
||||||
depends.exe
|
depends.exe
|
||||||
|
mkconfig
|
||||||
|
mkconfig.exe
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: Makefile,v 1.31 2001/04/10 17:48:16 dwelch Exp $
|
# $Id: Makefile,v 1.32 2001/04/10 22:13:22 dwelch Exp $
|
||||||
#
|
#
|
||||||
# ReactOS Operating System
|
# ReactOS Operating System
|
||||||
#
|
#
|
||||||
|
@ -9,24 +9,9 @@
|
||||||
PATH_TO_TOP := ..
|
PATH_TO_TOP := ..
|
||||||
|
|
||||||
#
|
#
|
||||||
# Architecture to build for
|
# Include details of the kernel configuration
|
||||||
#
|
#
|
||||||
ARCH := i386
|
include config
|
||||||
|
|
||||||
#
|
|
||||||
# Whether to compile in the kernel debugger
|
|
||||||
#
|
|
||||||
KDBG := 1
|
|
||||||
|
|
||||||
#
|
|
||||||
# Whether to compile for debugging
|
|
||||||
#
|
|
||||||
DBG := 1
|
|
||||||
|
|
||||||
#
|
|
||||||
# Whether to compile a multiprocessor or single processor version
|
|
||||||
#
|
|
||||||
MP := 0
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -62,7 +47,7 @@ CFLAGS = -Iinclude -D__NTOSKRNL__ $(CFLAGS_DBG) -Wall -Werror
|
||||||
|
|
||||||
include $(PATH_TO_TOP)/rules.mak
|
include $(PATH_TO_TOP)/rules.mak
|
||||||
|
|
||||||
all: config $(EXE_PREFIX)depends$(EXE_POSTFIX) \
|
all: $(EXE_PREFIX)depends$(EXE_POSTFIX) \
|
||||||
$(OBJECTS_PATH) \
|
$(OBJECTS_PATH) \
|
||||||
$(TARGETNAME).nostrip.exe \
|
$(TARGETNAME).nostrip.exe \
|
||||||
$(TARGETNAME).exe \
|
$(TARGETNAME).exe \
|
||||||
|
@ -616,12 +601,12 @@ ke/main.o: ke/main.c ../include/reactos/buildno.h
|
||||||
mkconfig$(EXE_SUFFIX): mkconfig.c
|
mkconfig$(EXE_SUFFIX): mkconfig.c
|
||||||
$(HOST_CC) -g -o mkconfig$(EXE_SUFFIX) mkconfig.c
|
$(HOST_CC) -g -o mkconfig$(EXE_SUFFIX) mkconfig.c
|
||||||
|
|
||||||
config:
|
include/internal/config.h: config mkconfig$(EXE_SUFFIX)
|
||||||
$(EXE_PREFIX)mkconfig$(EXE_SUFFIX) include/internal/config.h $(CONFIG)
|
$(EXE_PREFIX)mkconfig$(EXE_SUFFIX) include/internal/config.h$(CONFIG)
|
||||||
|
|
||||||
.PHONY: config
|
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
include $(D1_FILES)
|
include $(D1_FILES)
|
||||||
|
endif
|
||||||
|
|
||||||
.%.d: %.c $(EXE_PREFIX)depends$(EXE_POSTFIX)
|
.%.d: %.c $(EXE_PREFIX)depends$(EXE_POSTFIX)
|
||||||
$(CC) $(CFLAGS) -M $< | $(EXE_PREFIX)depends$(EXE_POSTFIX) $(@D) $@
|
$(CC) $(CFLAGS) -M $< | $(EXE_PREFIX)depends$(EXE_POSTFIX) $(@D) $@
|
||||||
|
|
19
reactos/ntoskrnl/config
Normal file
19
reactos/ntoskrnl/config
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#
|
||||||
|
# Architecture to build for
|
||||||
|
#
|
||||||
|
ARCH := i386
|
||||||
|
|
||||||
|
#
|
||||||
|
# Whether to compile in the kernel debugger
|
||||||
|
#
|
||||||
|
KDBG := 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# Whether to compile for debugging
|
||||||
|
#
|
||||||
|
DBG := 1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Whether to compile a multiprocessor or single processor version
|
||||||
|
#
|
||||||
|
MP := 0
|
|
@ -1,4 +1,7 @@
|
||||||
/* Automatically generated, don't edit */
|
/* Automatically generated, Edit the Makefile to change configuration */
|
||||||
|
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_CONFIG_H
|
||||||
|
#define __NTOSKRNL_INCLUDE_INTERNAL_CONFIG_H
|
||||||
#define DBG
|
#define DBG
|
||||||
#define KDBG
|
|
||||||
#define UP
|
#define UP
|
||||||
|
#define CONFIG "DBG UP"
|
||||||
|
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_CONFIG_H */
|
||||||
|
|
|
@ -44,7 +44,7 @@ write_if_change(char* outbuf, char* filename)
|
||||||
fclose(out);
|
fclose(out);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
if (memcmp(cmpbuf, outbuf, max(end, strlen(outbuf))) == 0)
|
if (end == strlen(outbuf) && memcmp(cmpbuf, outbuf, end) == 0)
|
||||||
{
|
{
|
||||||
fclose(out);
|
fclose(out);
|
||||||
return(0);
|
return(0);
|
||||||
|
@ -75,6 +75,7 @@ main(int argc, char* argv[])
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char* outbuf;
|
char* outbuf;
|
||||||
char* s;
|
char* s;
|
||||||
|
char config[512];
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
|
@ -90,11 +91,22 @@ main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
s = outbuf;
|
s = outbuf;
|
||||||
s = s + sprintf(s, "/* Automatically generated, don't edit */\n");
|
s = s + sprintf(s, "/* Automatically generated, ");
|
||||||
|
s = s + sprintf(s, "Edit the Makefile to change configuration */\n");
|
||||||
|
s = s + sprintf(s, "#ifndef __NTOSKRNL_INCLUDE_INTERNAL_CONFIG_H\n");
|
||||||
|
s = s + sprintf(s, "#define __NTOSKRNL_INCLUDE_INTERNAL_CONFIG_H\n");
|
||||||
|
strcpy(config, "");
|
||||||
for (i = 2; i < argc; i++)
|
for (i = 2; i < argc; i++)
|
||||||
{
|
{
|
||||||
s = s + sprintf(s, "#define %s\n", argv[i]);
|
s = s + sprintf(s, "#define %s\n", argv[i]);
|
||||||
|
strcat(config, argv[i]);
|
||||||
|
if (i != (argc - 1))
|
||||||
|
{
|
||||||
|
strcat(config, " ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
s = s + sprintf(s, "#define CONFIG \"%s\"\n", config);
|
||||||
|
s = s + sprintf(s, "#endif /* __NTOSKRNL_INCLUDE_INTERNAL_CONFIG_H */\n");
|
||||||
|
|
||||||
return(write_if_change(outbuf, argv[1]));
|
return(write_if_change(outbuf, argv[1]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue