Changeset 439 for trunk/user/ksh/Makefile
- Timestamp:
- Apr 4, 2018, 3:35:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/ksh/Makefile
r427 r439 1 1 ######################################################################### 2 # Makefile for the ALMOS-MKH "ksh" application on the TSAR architecture2 # Makefile for the ALMOS-MKH "ksh" application 3 3 ######################################################################### 4 4 5 CC = mipsel-unknown-elf-gcc 6 AS = mipsel-unknown-elf-as 7 LD = mipsel-unknown-elf-ld 8 DU = mipsel-unknown-elf-objdump 9 AR = mipsel-unknown-elf-ar 5 -include ../../params-soft.mk 6 ifeq ($(ARCH_NAME),) 7 $(error Please define in ARCH_NAME parameter in params-soft.mk!) 8 endif 10 9 11 LIBS = ../../libs 10 OBJS = build/ksh.o 12 11 13 HAL = ../../hal 12 INCLUDES = -I. -I$(LIBC_INCLUDE) -I$(LIBPTHREAD_INCLUDE) 14 13 15 KERNEL = ../../kernel 16 17 CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 \ 18 -fno-delete-null-pointer-checks -fomit-frame-pointer 19 20 OBJS = ksh.o \ 21 $(LIBS)/build/stdlib.o \ 22 $(LIBS)/build/stdio.o \ 23 $(LIBS)/build/string.o \ 24 $(LIBS)/build/malloc.o \ 25 $(LIBS)/build/pthread.o \ 26 $(LIBS)/build/hal_user.o 27 28 29 INCLUDES = -I. -I$(LIBS) -I$(KERNEL)/syscalls -I$(HAL)/generic 30 31 ksh.elf : $(OBJS) ksh.ld 32 $(LD) -o $@ -T ksh.ld $(OBJS) 14 compile: dirs build/ksh.elf 15 build/ksh.elf : $(OBJS) ksh.ld 16 $(LD) -o $@ -T ksh.ld $(OBJS) -nostdlib -L$(LIBC) -L$(LIBPTHREAD) -lc -lpthread 33 17 $(DU) -D $@ > $@.txt 34 18 35 ksh.o : ksh.c19 build/ksh.o : ksh.c 36 20 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 37 21 $(DU) -D $@ > $@.txt 38 22 39 $(LIBS)/build/hal_user.o : $(HAL)/tsar_mips32/core/hal_user.c $(HAL)/generic/hal_user.h 40 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 41 $(DU) -D $@ > $@.txt 42 43 $(LIBS)/build/stdlib.o : $(LIBS)/stdlib.c $(LIBS)/stdlib.h 44 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 45 $(DU) -D $@ > $@.txt 46 47 $(LIBS)/build/stdio.o : $(LIBS)/stdio.c $(LIBS)/stdio.h 48 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 49 $(DU) -D $@ > $@.txt 50 51 $(LIBS)/build/string.o : $(LIBS)/string.c $(LIBS)/string.h 52 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 53 $(DU) -D $@ > $@.txt 54 55 $(LIBS)/build/malloc.o : $(LIBS)/malloc.c $(LIBS)/malloc.h 56 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 57 $(DU) -D $@ > $@.txt 58 59 $(LIBS)/build/pthread.o : $(LIBS)/pthread.c $(LIBS)/pthread.h 60 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 61 $(DU) -D $@ > $@.txt 23 dirs: 24 @mkdir -p build/ 62 25 63 26 clean: 64 rm -f *.o *.elf *.txt core $(LIBS)/build/*.o $(LIBS)/build/*.txt 27 rm -rf build/*.o build/*.elf build/*.o.txt 28 29 .PHONY: dirs clean 65 30 66 31
Note: See TracChangeset
for help on using the changeset viewer.