jos/lib/Makefrag

47 lines
1015 B
Plaintext
Raw Normal View History

2018-09-25 09:22:51 -07:00
OBJDIRS += lib
LIB_SRCFILES := lib/console.c \
lib/libmain.c \
lib/exit.c \
lib/panic.c \
lib/printf.c \
lib/printfmt.c \
lib/readline.c \
lib/string.c \
lib/syscall.c
2018-10-06 06:52:47 -07:00
LIB_SRCFILES := $(LIB_SRCFILES) \
lib/pgfault.c \
lib/pfentry.S \
lib/fork.c \
lib/ipc.c
2018-09-25 09:22:51 -07:00
2018-10-24 17:44:45 -07:00
LIB_SRCFILES := $(LIB_SRCFILES) \
lib/args.c \
lib/fd.c \
lib/file.c \
lib/fprintf.c \
lib/pageref.c \
lib/spawn.c
2018-09-25 09:22:51 -07:00
2018-10-24 17:44:45 -07:00
LIB_SRCFILES := $(LIB_SRCFILES) \
lib/pipe.c \
lib/wait.c
2018-09-25 09:22:51 -07:00
LIB_OBJFILES := $(patsubst lib/%.c, $(OBJDIR)/lib/%.o, $(LIB_SRCFILES))
LIB_OBJFILES := $(patsubst lib/%.S, $(OBJDIR)/lib/%.o, $(LIB_OBJFILES))
$(OBJDIR)/lib/%.o: lib/%.c $(OBJDIR)/.vars.USER_CFLAGS
@echo + cc[USER] $<
@mkdir -p $(@D)
$(V)$(CC) -nostdinc $(USER_CFLAGS) -c -o $@ $<
$(OBJDIR)/lib/%.o: lib/%.S $(OBJDIR)/.vars.USER_CFLAGS
@echo + as[USER] $<
@mkdir -p $(@D)
$(V)$(CC) -nostdinc $(USER_CFLAGS) -c -o $@ $<
$(OBJDIR)/lib/libjos.a: $(LIB_OBJFILES)
@echo + ar $@
$(V)$(AR) r $@ $(LIB_OBJFILES)