############################################################################ # Makefile for the "sort" application running on ALMOS-MKH ############################################################################ -include ../../params-soft.mk ifeq ($(ARCH_NAME),) $(error Please define in ARCH_NAME parameter in params-soft.mk!) endif OBJS = build/sort.o INCLUDES = -I. \ -I$(LIBC_INCLUDE) \ -I$(LIBPTHREAD_INCLUDE) \ -I$(LIBALMOSMKH_INCLUDE) \ -I$(SHARED_INCLUDE) \ -I$(HAL_INCLUDE) compile: dirs build/sort.elf build/sort.elf : $(OBJS) sort.ld $(LD) -o $@ -T sort.ld $(OBJS) -L$(LIBC) -L$(LIBPTHREAD) -L$(LIBALMOSMKH) \ -lc -lpthread -lalmosmkh -lpthread -lc $(DU) -D $@ > $@.txt build/sort.o : sort.c $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< dirs: @mkdir -p build/ clean: rm -rf build/*.o build/*.elf build/*.txt .PHONY: dirs clean