Changeset 440 for trunk/Makefile


Ignore:
Timestamp:
May 3, 2018, 5:51:22 PM (6 years ago)
Author:
alain
Message:

1/ Fix a bug in the Multithreaded "sort" applicationr:
The pthread_create() arguments must be declared as global variables.
2/ The exit syscall can be called by any thread of a process..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r439 r440  
    1111
    1212# Default values for hardware parameters.
    13 # These parameters should be defined in the 'params.mk' file.
     13# These parameters should be defined in the 'params-hard.mk' file.
    1414ARCH            ?= /users/alain/soc/tsar-trunk-svn-2013/platforms/tsar_generic_iob
    1515X_SIZE          ?= 2
     
    1919FBF_WIDTH       ?= 256
    2020IOC_TYPE        ?= IOC_BDV
     21
    2122# Checking hardware platform definition.
    2223ifeq ($(wildcard $(ARCH)),)
     
    2627# Rules that don't build target files
    2728# always out-of-date, need to be regenerated everytime they are called
    28 .PHONY: compile                         \
    29         hard_config.h           \
    30                 dirs                                \
    31                 list                                \
    32                 extract                             \
    33                 fsck                                \
    34                 clean                               \
    35                 build_libs  \
    36                 build-disk                          \
    37                 $(BOOTLOADER_PATH)/build/boot.elf           \
    38                 kernel/build/kernel.elf \
    39                 user/init/build/init.elf \
    40                 user/ksh/build/ksh.elf \
    41                 user/pgcd/build/pgcd.elf \
    42                 user/sort/build/sort.elf \
     29.PHONY: compile                                \
     30        hard_config.h                      \
     31                dirs                                           \
     32                list                                           \
     33                extract                                        \
     34                fsck                                           \
     35                clean                                          \
     36                build_libs                         \
     37                build-disk                                     \
     38                $(BOOTLOADER_PATH)/build/boot.elf  \
     39                kernel/build/kernel.elf            \
     40                user/init/build/init.elf           \
     41                user/ksh/build/ksh.elf             \
     42                user/pgdc/build/pgcd.elf           \
     43                user/hello/build/hello.elf         \
     44                user/sort/build/sort.elf
    4345
    4446# Virtual disk path
     
    4749# The Mtools used to build the FAT32 disk image perfom a few sanity checks, to
    4850# make sure that the disk is indeed an MS-DOS disk. However, the size of the
    49 # disk image used by ALMOS-VM is not MS-DOS compliant.
     51# disk image used by ALMOS-MKH is not MS-DOS compliant.
    5052# Setting this variable prevents these checks.
    5153MTOOLS_SKIP_CHECK := 1
    5254
    53 # Rule to generate boot.elf, kernel.elf, ksh.elf, sort.elf and update virtual disk.
    54 compile: dirs                     \
    55          build_disk               \
    56          hard_config.h            \
    57          build_libs               \
     55# Rule to generate boot.elf, kernel.elf, all user.elf files, and update virtual disk.
     56compile: dirs                              \
     57         build_disk                        \
     58         hard_config.h                     \
     59         build_libs                        \
    5860         $(BOOTLOADER_PATH)/build/boot.elf \
    59          kernel/build/kernel.elf  \
    60          user/init/build/init.elf \
    61          user/ksh/build/ksh.elf   \
    62          user/sort/build/sort.elf \
    63          user/pgcd/build/pgcd.elf \
     61         kernel/build/kernel.elf           \
     62         user/init/build/init.elf          \
     63         user/ksh/build/ksh.elf            \
     64         user/pgcd/build/pgcd.elf          \
     65         user/hello/build/hello.elf        \
     66         user/sort/build/sort.elf          \
    6467         list
    6568
    66 # Rule to create the build directories.
     69# Rule to create the hdd directory
    6770dirs:
    6871        @mkdir -p hdd
     
    9194        $(MAKE) -C user/sort clean
    9295        $(MAKE) -C user/pgcd clean
     96        $(MAKE) -C user/hello clean
    9397        $(MAKE) -C $(HAL_ARCH) clean
    9498
     
    126130        mdir             -/ -b -i $(DISK_IMAGE) ::/
    127131
     132############################################
     133# Rules to generate the user level libraries
    128134build_libs: build_hal
    129135        $(MAKE) -C $(LIBC_PATH)
     
    136142        dd if=$@ of=$(DISK_IMAGE) seek=2 conv=notrunc
    137143
     144#####################################################################
     145# Rule to generate boot.elf and place it in sector #2 of virtual disk
    138146build_hal:
    139147        $(MAKE) -C $(HAL_ARCH)
     
    145153        mcopy -o -i $(DISK_IMAGE) $@ ::/bin/kernel
    146154
    147 ###############################################################
    148 # Rules to generate various user .elf and copy on virtual disk
     155#####################################################
     156# Rules to generate user.elf and copy on virtual disk
    149157user/init/build/init.elf: build_libs
    150158        $(MAKE) -C user/init
     
    153161        $(MAKE) -C user/ksh
    154162        mcopy -o -i $(DISK_IMAGE) $@ ::/bin/user
    155 user/pdcg/build/pdcg.elf: build_libs
    156         $(MAKE) -C user/pdcg
     163user/pgcd/build/pgcd.elf: build_libs
     164        $(MAKE) -C user/pgcd
     165        mcopy -o -i $(DISK_IMAGE) $@ ::/bin/user
     166user/hello/build/hello.elf: build_libs
     167        $(MAKE) -C user/hello
    157168        mcopy -o -i $(DISK_IMAGE) $@ ::/bin/user
    158169user/sort/build/sort.elf: build_libs
Note: See TracChangeset for help on using the changeset viewer.