17 lines
481 B
Plaintext
17 lines
481 B
Plaintext
OBJDIRS += user
|
|
|
|
|
|
USERLIBS += jos
|
|
|
|
$(OBJDIR)/user/%.o: user/%.c $(OBJDIR)/.vars.USER_CFLAGS
|
|
@echo + cc[USER] $<
|
|
@mkdir -p $(@D)
|
|
$(V)$(CC) -nostdinc $(USER_CFLAGS) -c -o $@ $<
|
|
|
|
$(OBJDIR)/user/%: $(OBJDIR)/user/%.o $(OBJDIR)/lib/entry.o $(USERLIBS:%=$(OBJDIR)/lib/lib%.a) user/user.ld
|
|
@echo + ld $@
|
|
$(V)$(LD) -o $@ $(ULDFLAGS) $(LDFLAGS) -nostdlib $(OBJDIR)/lib/entry.o $@.o -L$(OBJDIR)/lib $(USERLIBS:%=-l%) $(GCC_LIB)
|
|
$(V)$(OBJDUMP) -S $@ > $@.asm
|
|
$(V)$(NM) -n $@ > $@.sym
|
|
|