Changeset 439 for trunk/user/init/Makefile
- Timestamp:
- Apr 4, 2018, 3:35:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/init/Makefile
r427 r439 1 1 ######################################################################### 2 # Makefile for the ALMOS-MKH "init" application on the TSAR architecture2 # Makefile for the ALMOS-MKH "init" 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 12 13 HAL = ../../hal 14 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 = init.o \ 21 $(LIBS)/build/stdlib.o \ 22 $(LIBS)/build/stdio.o \ 23 $(LIBS)/build/pthread.o \ 24 $(LIBS)/build/malloc.o \ 25 $(LIBS)/build/hal_user.o 10 OBJS = build/init.o 26 11 27 12 INCLUDES = -I. \ 28 13 -I../.. \ 29 -I$(LIBS)/ \ 30 -I$(KERNEL)/syscalls \ 31 -I$(HAL)/generic 14 -I$(LIBC_INCLUDE)/ \ 15 -I$(LIBPTHREAD_INCLUDE) \ 32 16 33 init.elf : $(OBJS) init.ld 34 $(LD) -o $@ -T init.ld $(OBJS) 17 compile : dirs build/init.elf 18 build/init.elf : $(OBJS) init.ld 19 $(LD) -o $@ -T init.ld $(OBJS) -nostdlib -L$(LIBC) -L$(LIBPTHREAD) -lc -lpthread 35 20 $(DU) -D $@ > $@.txt 36 21 37 init.o : init.c22 build/init.o : init.c 38 23 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 39 24 $(DU) -D $@ > $@.txt 40 25 41 $(LIBS)/build/hal_user.o : $(HAL)/tsar_mips32/core/hal_user.c $(HAL)/generic/hal_user.h 42 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 43 $(DU) -D $@ > $@.txt 44 45 $(LIBS)/build/stdlib.o : $(LIBS)/stdlib.c $(LIBS)/stdlib.h 46 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 47 $(DU) -D $@ > $@.txt 48 49 $(LIBS)/build/stdio.o : $(LIBS)/stdio.c $(LIBS)/stdio.h 50 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 51 $(DU) -D $@ > $@.txt 52 53 $(LIBS)/build/pthread.o : $(LIBS)/pthread.c $(LIBS)/pthread.h 54 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 55 $(DU) -D $@ > $@.txt 56 57 $(LIBS)/build/malloc.o : $(LIBS)/malloc.c $(LIBS)/malloc.h 58 $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< 59 $(DU) -D $@ > $@.txt 60 61 26 dirs: 27 @mkdir -p build 62 28 63 29 clean: 64 rm -f *.o *.elf *.txt core $(LIBS)/build/*.o $(LIBS)/build/*.txt 30 rm -rf build/*.o build/*.elf build/*.o.txt 31 32 .PHONY: dirs clean 33
Note: See TracChangeset
for help on using the changeset viewer.