Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 6c942e1 in mainline


Ignore:
Timestamp:
2012-04-06T12:23:24Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
e61aa80
Parents:
3f0ea0e2
Message:

Better parallel building of MSIM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/msim/Makefile

    r3f0ea0e2 r6c942e1  
    4747all: $(BINARY)
    4848
    49 # FIXME - better parallelization
     49.PHONY: all clean unpack-tarball
    5050
    51 $(BINARY):
    52 # Download it
    53         wget "$(MSIM_MIRROR)$(MSIM_TARBALL)" -O $(MSIM_TARBALL)
    54 # Unpack it
    55         tar xjf $(MSIM_TARBALL)
    56 # Extract sources
     51clean:
     52        rm -rf msim Makefile.depend* *.map *.disasm $(MSIM_TARBALL) $(MSIM_DIST)
     53
     54$(BINARY): $(MSIM_DIST)/src/msim
     55        $(CP) $< $@
     56
     57# Run make in MSIM src directory
     58$(MSIM_DIST)/src/msim: $(MSIM_PATCHED_FILES) $(MSIM_DIST)/src/Makefile.sources Makefile
     59        cd $(MSIM_DIST)/src; make -f $(MSIM_HELENOS_MAKEFILE) USPACE_PREFIX=../../$(USPACE_PREFIX)
     60       
     61# Copy HelenOS specific files
     62$(MSIM_DIST)/config.h: config.h.msim | unpack-tarball
     63        $(CP) $< $@
     64
     65$(MSIM_DIST)/src/helenos.c: helenos.c | unpack-tarball
     66        $(CP) $< $@
     67
     68$(MSIM_DIST)/src/helenos_input.c: helenos_input.c | unpack-tarball
     69        $(CP) $< $@
     70
     71$(MSIM_DIST)/src/$(MSIM_HELENOS_MAKEFILE): $(MSIM_HELENOS_MAKEFILE) | unpack-tarball
     72        $(CP) $< $@
     73
     74# Extract list of sources, remove POSIX/Linux specific
     75$(MSIM_DIST)/src/Makefile.sources: | unpack-tarball
    5776        cd $(MSIM_DIST)/src; ( \
    5877                echo 'all__:'; \
    5978                echo -e '\t@echo SOURCES = $$(SOURCES)'; cat Makefile.in \
    6079        ) | make -f - | grep 'SOURCES' >Makefile.sources
    61 # Patch it
    6280        sed \
    6381                -e 's:io/input.c:$(MSIM_HELENOS_PLATFORM_FILES):' \
     
    6583                -e 's:arch/posix/stdin.c::' \
    6684                -i $(MSIM_DIST)/src/Makefile.sources
    67         $(CP) config.h.msim $(MSIM_DIST)/config.h
    68         $(CP) $(MSIM_HELENOS_MAKEFILE) $(MSIM_HELENOS_PLATFORM_FILES) $(MSIM_DIST)/src/
    69 # Build it
    70         cd $(MSIM_DIST)/src; make -f $(MSIM_HELENOS_MAKEFILE) USPACE_PREFIX=../../$(USPACE_PREFIX)
    71         $(CP) $(MSIM_DIST)/src/msim $@
    7285
    73 clean:
    74         rm -rf msim Makefile.depend* *.map *.disasm $(MSIM_TARBALL) $(MSIM_DIST)
     86# Download tarball
     87$(MSIM_TARBALL):
     88        wget "$(MSIM_MIRROR)$(MSIM_TARBALL)" -O $(MSIM_TARBALL)
    7589
     90unpack-tarball: $(MSIM_TARBALL)
     91        tar xjf $(MSIM_TARBALL)
Note: See TracChangeset for help on using the changeset viewer.