Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (7 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user/ksh/Makefile

    r246 r407  
    1 #
    2 # Almos-MKH Shell
    3 #
     1#########################################################################
     2# Makefile for the ALMOS-MKH "ksh" application on the TSAR architecture
     3#########################################################################
    44
    55CC = mipsel-unknown-elf-gcc
     
    99AR = mipsel-unknown-elf-ar
    1010
    11 all:
    12         $(CC) -W -o ksh ksh.c
     11LIBS = ../../libs
     12
     13HAL  = ../../hal
     14
     15KERNEL = ../../kernel
     16
     17CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 \
     18                 -fno-delete-null-pointer-checks -fomit-frame-pointer
     19
     20OBJS = ksh.o                    \
     21       $(LIBS)/build/stdlib.o   \
     22       $(LIBS)/build/stdio.o    \
     23       $(LIBS)/build/nostdio.o  \
     24       $(LIBS)/build/string.o   \
     25       $(LIBS)/build/malloc.o   \
     26       $(LIBS)/build/pthread.o  \
     27       $(LIBS)/build/hal_user.o
     28       
     29
     30INCLUDES = -I. -I$(LIBS) -I$(KERNEL)/syscalls -I$(HAL)/generic
     31
     32ksh.elf : $(OBJS) ksh.ld
     33        $(LD) -o $@ -T ksh.ld $(OBJS)
     34        $(DU) -D $@ > $@.txt
     35
     36ksh.o : ksh.c
     37        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     38        $(DU) -D $@ > $@.txt
     39
     40$(LIBS)/build/hal_user.o : $(HAL)/tsar_mips32/core/hal_user.c $(HAL)/generic/hal_user.h
     41        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     42        $(DU) -D $@ > $@.txt
     43
     44$(LIBS)/build/stdlib.o : $(LIBS)/stdlib.c $(LIBS)/stdlib.h
     45        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     46        $(DU) -D $@ > $@.txt
     47
     48$(LIBS)/build/stdio.o : $(LIBS)/stdio.c $(LIBS)/stdio.h
     49        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     50        $(DU) -D $@ > $@.txt
     51
     52$(LIBS)/build/nostdio.o : $(LIBS)/nostdio.c $(LIBS)/nostdio.h
     53        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     54        $(DU) -D $@ > $@.txt
     55
     56$(LIBS)/build/string.o : $(LIBS)/string.c $(LIBS)/string.h
     57        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     58        $(DU) -D $@ > $@.txt
     59
     60$(LIBS)/build/malloc.o : $(LIBS)/malloc.c $(LIBS)/malloc.h
     61        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     62        $(DU) -D $@ > $@.txt
     63
     64$(LIBS)/build/pthread.o : $(LIBS)/pthread.c $(LIBS)/pthread.h
     65        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
     66        $(DU) -D $@ > $@.txt
    1367
    1468clean:
    15         rm ksh
     69        rm -f *.o *.elf *.txt core $(LIBS)/build/*.o $(LIBS)/build/*.txt
    1670
     71
Note: See TracChangeset for help on using the changeset viewer.