2 # - Library Common Makefile
6 _BIN := $(OUTPUTDIR)Libs/$(BIN)
7 _XBIN := $(addprefix $(OUTPUTDIR)Libs/,$(EXTRABIN))
8 _OBJPREFIX := obj-$(ARCH)/
10 _LIBS := $(filter -l%,$(LDFLAGS))
11 _LIBS := $(patsubst -l%,$(OUTPUTDIR)Libs/lib%.so,$(_LIBS))
13 OBJ := $(addprefix $(_OBJPREFIX),$(OBJ))
15 DEPFILES := $(addsuffix .dep,$(OBJ))
17 .PHONY: all clean install postbuild
22 $(RM) $(_BIN) $(_XBIN) $(OBJ) $(_BIN).dsm $(DEPFILES) $(EXTRACLEAN)
25 @echo [xCP] $(DISTROOT)/Libs/$(BIN)
26 @$(xMKDIR) $(DISTROOT)/Libs; true
27 @$(STRIP) $(_BIN) -o $(_BIN)_
28 @$(xCP) $(_BIN)_ $(DISTROOT)/Libs/$(BIN)
31 $(xCP) $(_XBIN) $(DISTROOT)/Libs/
34 # for f in $(INCFILES); do ln -s $f $(ACESSDIR)/include/$f; done
37 $(_BIN): $(OBJ) $(_LIBS)
38 @mkdir -p $(dir $(_BIN))
39 @echo [LD] -o $(BIN) $(OBJ)
40 @$(LD) $(LDFLAGS) -o $(_BIN) $(OBJ) $(shell $(CC) -print-libgcc-file-name)
41 @$(DISASM) -S $(_BIN) > $(_OBJPREFIX)$(BIN).dsm
46 @$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
49 $(_OBJPREFIX)%.ao: %.$(ASSUFFIX)
52 @$(AS) $(ASFLAGS) -o $@ $<
59 #$(OUTPUTDIR)Libs/libld-acess.so:
60 # @make -C $(ACESSDIR)/Usermode/Libraries/ld-acess.so_src/
62 @make -C $(ACESSDIR)/Usermode/Libraries/$*_src/