2015-09-28 08:33:37 -04:00
|
|
|
include ../include/generated/variables.mak
|
|
|
|
include $(MISOC_DIRECTORY)/software/common.mak
|
2015-07-26 05:59:18 -04:00
|
|
|
|
2015-10-18 23:33:21 -04:00
|
|
|
# lm32 is not supported
|
|
|
|
ifeq ($(CPU),lm32)
|
|
|
|
ALL_TARGET=
|
|
|
|
else
|
|
|
|
ALL_TARGET=libunwind.a
|
|
|
|
endif
|
|
|
|
|
2015-07-26 05:59:18 -04:00
|
|
|
COMMONFLAGS+=-integrated-as \
|
2015-09-28 08:33:37 -04:00
|
|
|
-I. -I$(MISOC_DIRECTORY)/software/include/dyld/ -I$(MISOC_DIRECTORY)/software/unwinder/include/ \
|
|
|
|
-I$(LIBUNWIND_DIRECTORY) \
|
2015-08-01 23:25:40 -04:00
|
|
|
-D__ELF__ -D__linux__ -D_LIBUNWIND_NO_HEAP -DNDEBUG
|
2015-07-26 05:59:18 -04:00
|
|
|
|
|
|
|
OBJECTS=UnwindRegistersSave.o UnwindRegistersRestore.o UnwindLevel1.o libunwind.o
|
|
|
|
|
2015-10-18 23:33:21 -04:00
|
|
|
all: $(ALL_TARGET)
|
2015-07-26 05:59:18 -04:00
|
|
|
|
|
|
|
# pull in dependency info for *existing* .o files
|
|
|
|
-include $(OBJECTS:.o=.d)
|
|
|
|
|
|
|
|
libunwind.a: $(OBJECTS)
|
|
|
|
$(AR) crs libunwind.a $(OBJECTS)
|
|
|
|
|
2015-09-28 08:33:37 -04:00
|
|
|
%.o: $(MISOC_DIRECTORY)/software/unwinder/src/%.cpp
|
2015-07-26 05:59:18 -04:00
|
|
|
$(compilexx-dep)
|
|
|
|
|
2015-09-28 08:33:37 -04:00
|
|
|
%.o: $(MISOC_DIRECTORY)/software/unwinder/src/%.c
|
2015-07-26 05:59:18 -04:00
|
|
|
$(compile-dep)
|
|
|
|
|
2015-09-28 08:33:37 -04:00
|
|
|
%.o: $(MISOC_DIRECTORY)/software/unwinder/src/%.S
|
2015-07-26 05:59:18 -04:00
|
|
|
$(assemble)
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
2015-09-28 08:33:37 -04:00
|
|
|
$(RM) $(OBJECTS) $(OBJECTS:.o=.ts) $(OBJECTS:.o=.d) libunwind.a .*~ *~
|