Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 1727

Show
Ignore:
Timestamp:
07/04/10 22:21:55 (14 years ago)
Author:
andrei
Message:

Added DMDEXTRAFLAGS; removed std.all

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phobos/linux.mak

    r1616 r1727  
    7878ifeq ($(OS),posix) 
    7979    CFLAGS += -m32 
    8080    ifeq ($(BUILD),debug) 
    8181        CFLAGS += -g 
    8282    else 
    8383        CFLAGS += -O3 
    8484    endif 
    8585endif 
    8686 
    8787# Set DFLAGS 
    88 DFLAGS := -I$(DRUNTIME_PATH)/import 
     88DFLAGS := -I$(DRUNTIME_PATH)/import $(DMDEXTRAFLAGS) 
    8989ifeq ($(BUILD),debug) 
    9090    DFLAGS += -w -g -debug -d 
    9191else 
    9292    DFLAGS += -w -O -release -nofloat -d 
    9393endif 
    9494 
    9595# Set DOTOBJ and DOTEXE 
    9696ifeq (,$(findstring win,$(OS))) 
    9797    DOTOBJ:=.o 
    9898    DOTEXE:= 
     
    112112ifeq (,$(findstring win,$(OS))) 
    113113    LIB = $(ROOT)/libphobos2.a 
    114114else 
    115115    LIB = $(ROOT)/phobos.lib 
    116116endif 
    117117 
    118118################################################################################ 
    119119MAIN = $(ROOT)/emptymain.d 
    120120 
    121121# Stuff in std/ 
    122 STD_MODULES = $(addprefix std/, algorithm all array base64 bigint     \ 
    123         bitmanip boxer compiler complex concurrency container         \ 
    124         contracts conv cpuid cstream ctype date datebase dateparse    \ 
    125         demangle encoding file format functional getopt gregorian     \ 
    126         intrinsic json loader math md5 metastrings mmfile numeric     \ 
    127         outbuffer path perf process random range regex regexp signals
    128         socket socketstream stdint stdio stdiobase stream string      \ 
    129         syserror system traits typecons typetuple uni uri utf variant
    130         xml zip zlib) 
     122STD_MODULES = $(addprefix std/, algorithm array base64 bigint bitmanip    \ 
     123        boxer compiler complex concurrency container contracts conv       \ 
     124        cpuid cstream ctype date datebase dateparse demangle encoding
     125        exception file format functional getopt gregorian intrinsic       \ 
     126        json loader math md5 metastrings mmfile numeric outbuffer path    \ 
     127        perf process random range regex regexp signals socket         \ 
     128        socketstream stdint stdio stdiobase stream string syserror        \ 
     129        system traits typecons typetuple uni uri utf variant xml zip  \ 
     130        zlib) 
    131131 
    132132# Other D modules that aren't under std/ 
    133133EXTRA_MODULES := $(addprefix std/c/, stdarg stdio) $(addprefix etc/c/,  \ 
    134134        zlib) $(addprefix std/internal/math/, biguintcore biguintnoasm  \ 
    135135        biguintx86) 
    136136 
    137137# OS-specific D modules 
    138138EXTRA_MODULES_POSIX := $(addprefix std/c/linux/, linux socket) 
    139139EXTRA_MODULES_WIN32 := $(addprefix std/c/windows/, com stat windows     \ 
    140140        winsock) $(addprefix std/windows/, charset iunknown syserror) 
     
    185185else 
    186186# This branch is normally taken in recursive builds. All we need to do 
    187187# is set the default build to $(BUILD) (which is either debug or 
    188188# release) and then let the unittest depend on that build's unittests. 
    189189$(BUILD) : $(LIB) 
    190190unittest : $(addsuffix $(DOTEXE),$(addprefix $(ROOT)/unittest/,$(D_MODULES))) 
    191191endif 
    192192 
    193193################################################################################ 
    194194 
    195 std/all.d : $(MAKEFILE) 
    196     @echo module std.all\;\\n \ 
    197         $(addprefix public import ,$(addsuffix \;\\n,$(STD_MODULES))) | \ 
    198         sed -e 's|/|.|' -e '/public import std\.all/d' >$@ 
    199  
    200195$(ROOT)/%$(DOTOBJ) : %.c 
    201196    @[ -d $(dir $@) ] || mkdir -p $(dir $@) || [ -d $(dir $@) ] 
    202197    $(CC) -c $(CFLAGS) $< -o$@ 
    203198 
    204199$(LIB) : $(OBJS) $(ALL_D_FILES) $(DRUNTIME) 
    205200    $(DMD) $(DFLAGS) -lib -of$@ $(DRUNTIME) $(D_FILES) $(OBJS) 
    206201 
    207202$(ROOT)/unittest/%$(DOTEXE) : %.d $(LIB) $(ROOT)/emptymain.d 
    208203    @echo Testing $@ 
    209204    @$(DMD) $(DFLAGS) -unittest $(LINKOPTS) -of$@ $(ROOT)/emptymain.d $< 
     
    218213%$(DOTEXE) : %$(DOTOBJ) 
    219214 
    220215$(ROOT)/emptymain.d : $(ROOT)/.directory 
    221216    @echo 'void main(){}' >$@ 
    222217 
    223218$(ROOT)/.directory : 
    224219    mkdir -p $(ROOT) || exists $(ROOT) 
    225220    touch $@ 
    226221 
    227222clean : 
    228     rm -rf $(ROOT_OF_THEM_ALL) $(ZIPFILE) $(DOC_OUTPUT_DIR) std/all.d 
     223    rm -rf $(ROOT_OF_THEM_ALL) $(ZIPFILE) $(DOC_OUTPUT_DIR) 
    229224 
    230225zip : 
    231226    zip $(ZIPFILE) $(MAKEFILE) $(ALL_D_FILES) $(ALL_C_FILES) 
    232227 
    233228install : release 
    234229    sudo cp $(LIB) /usr/lib/ 
    235230 
    236231$(DRUNTIME) : 
    237232    $(MAKE) -C $(DRUNTIME_PATH) -f posix.mak 
    238233 
     
    250245 
    251246$(DOC_OUTPUT_DIR)/std_c_linux_%.html : std/c/linux/%.d $(STDDOC) 
    252247    wine dmd $(DDOCFLAGS) -Df$@ $< 
    253248 
    254249$(STYLECSS_TGT) : $(STYLECSS_SRC) 
    255250    cp $< $@ 
    256251 
    257252html : $(addprefix $(DOC_OUTPUT_DIR)/, $(subst /,_,$(subst .d,.html,    \ 
    258253    $(SRC_DOCUMENTABLES)))) $(STYLECSS_TGT) 
    259254    @$(MAKE) -f $(DOCSRC)/linux.mak -C $(DOCSRC) --no-print-directory 
     255