X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2FMake.config;h=b1d480e70ae51453e636057e5b7d556722443825;hb=94e3568f3303b757f9e4133524b647163792662d;hp=d4143b84b857119e1bffb419df05d5671bd70a29;hpb=d46fd132092304422193b717d9a60641604cc1b5;p=pintos-anon diff --git a/src/Make.config b/src/Make.config index d4143b8..b1d480e 100644 --- a/src/Make.config +++ b/src/Make.config @@ -2,6 +2,8 @@ SHELL = /bin/sh +VPATH = $(SRCDIR) + # Binary utilities. # If the host appears to be x86, use the normal tools. # Otherwise assume cross-tools are installed as i386-elf-*. @@ -16,15 +18,17 @@ LD = i386-elf-ld OBJCOPY = i386-elf-objcopy endif -# Other utilities. -DD = dd -RM = rm -CAT = cat +ifeq ($(strip $(shell command -v $(CC) 2> /dev/null)),) +$(warning *** Compiler ($(CC)) not found. Did you set $$PATH properly? Please refer to the Getting Started section in the documentation for details. ***) +endif # Compiler and assembler invocation. -WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes -CFLAGS = -g -O3 -MMD -msoft-float +DEFINES = +WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wsystem-headers +CFLAGS = -g -MMD -msoft-float +CPPFLAGS = -nostdinc -I$(SRCDIR) -I$(SRCDIR)/lib ASFLAGS = -Wa,--gstabs -MMD +LDFLAGS = %.o: %.c $(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS) $(WARNINGS) $(DEFINES)