Draft: lab 5 failed
This commit is contained in:
@@ -13,6 +13,8 @@ LD := $(GNU)-ld
|
||||
LDFLAGS += -g -nostdlib -no-pie
|
||||
OBJCOPY := $(GNU)-objcopy
|
||||
|
||||
INCLUDE := -I../include -Iinclude
|
||||
|
||||
LD_SCRIPT := linker.ld
|
||||
SRCS := $(shell find . -name '*.[cS]')
|
||||
OBJS := $(SRCS:%=%.o)
|
||||
@@ -29,11 +31,11 @@ userprog.elf: $(LD_SCRIPT) $(OBJS)
|
||||
|
||||
%.S.o: %.S
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) -c $< -o $@ $(CCFLAGS)
|
||||
$(CC) -c $< -o $@ $(INCLUDE) $(CCFLAGS)
|
||||
|
||||
%.c.o: %.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) -c $< -o $@ $(CCFLAGS)
|
||||
$(CC) -c $< -o $@ $(INCLUDE) $(CCFLAGS)
|
||||
|
||||
clean:
|
||||
-rm $(OBJS) userprog userprog.elf
|
||||
|
||||
Reference in New Issue
Block a user