Changeset 12 for Make


Ignore:
Timestamp:
12/16/2006 10:39:50 PM (13 years ago)
Author:
art
Message:
  • Friendly thread execution added (yielding of threads and main thread)
  • Test directory added, where simple test programms will be build
  • Each Makefile now contains the TOPDIR variable
Location:
Make
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Make/Makedefs

    r11 r12  
    22# Paths where to find includes and libraries 
    33#----------------------------------------------- 
    4 INCPATH= -I/usr/local/include -I/usr/include 
    5 LIBPATH= -L/usr/local/lib -L/usr/lib 
    6 BUILDPATH= build 
    7 VPATH=. $(BUILDPATH) 
     4TOPDIR ?= . 
     5INCPATH = -I/usr/local/include -I/usr/include 
     6LIBPATH = -L/usr/local/lib -L/usr/lib 
     7BUILDPATH = build 
     8VPATH =. $(BUILDPATH) 
    89 
    910prefix ?= /usr/local 
     
    2122# Define macros with compiler options 
    2223#----------------------------------------------- 
    23 SHELL= /bin/sh 
    24 CC=g++ 
    25 CFLAGS= -O2 -Wall -Werror $(INCPATH) 
    26 LIBS=  
    27 LDFLAGS= -shared $(LIBPATH) $(LIBS) 
    28 DEPARG= -MM 
     24SHELL = /bin/sh 
     25CC = g++ 
     26CFLAGS =-O2 -Wall -Werror $(INCPATH) 
     27LIBS =  
     28LDFLAGS = -shared $(LIBPATH) $(LIBS) 
     29DEPARG = -MM 
    2930 
    3031INSTALL = install -c 
  • Make/Makedirrules

    r11 r12  
    2828        $(MAKE_TARGET_BEGIN) uninstall $(MAKE_TARGET_END) 
    2929 
     30test: 
     31        (cd $(TOPDIR)/Test && make all) 
  • Make/Makerules

    r11 r12  
    77         
    88__info: 
    9         @echo 'CFLAGS=$(CFLAGS), LDFLAGS=$(LDFLAGS)' 
     9        @echo 'Used flags for compilation are: ' 
     10        @echo 'CFLAGS = $(CFLAGS)' 
     11        @echo 'LDFLAGS = $(LDFLAGS)' 
    1012         
    1113$(TARGET): $(OBJECTS)  
    1214        @ echo -n 'Create $@ ...' 
    13         @ $(CC) $(LDFLAGS) $(addprefix $(BUILDPATH)/,$(OBJECTS) ) -o $@ 
     15        @ $(CC) $(addprefix $(BUILDPATH)/,$(OBJECTS) ) -o $@ $(LDFLAGS) 
    1416        @ echo 'OK' 
    1517 
     
    114116                        rm -rf $(INSTALL_DST); \ 
    115117                fi; ' 
    116          
     118 
     119#----------------------------------------------- 
     120# Make test suite 
     121#----------------------------------------------- 
     122check: test 
     123test: 
     124        (cd $(TOPDIR)/Test && make all) 
     125                 
    117126#----------------------------------------------- 
    118127# Clean all files 
Note: See TracChangeset for help on using the changeset viewer.