X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2FMake.config;h=fdf6ce164901a928f195355aadb1d588dc34baf5;hb=c12a66d060c18b8fddedff8905d09d7ccd50788c;hp=27f8328682154a84cf69030c66a895878942ea2f;hpb=7d4e3dda080a47db88616f1c0d975f2091be47f1;p=pintos-anon diff --git a/src/Make.config b/src/Make.config index 27f8328..fdf6ce1 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,18 @@ 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 -Wsystem-headers -CFLAGS = -g -MMD -msoft-float -masm=intel +DEFINES = +WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wsystem-headers \ + -Wdeclaration-after-statement +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)