Show
Ignore:
Timestamp:
05/19/08 14:05:43 (4 years ago)
Author:
WeirdCat
Message:

changed the makefile(s) to make use of the new DMD feature to build libraries directly

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/win32/makefile

    r251 r259  
    33 
    44DC := dmd.exe 
    5 LIB := lib.exe 
    65 
    7 DFLAGS := -inline -I.. -O -release -w 
    8 #DFLAGS := -debug -g -I.. -unittest -w 
     6DFLAGS := -inline -O -release -w 
     7#DFLAGS := -debug -gc -unittest -w 
    98 
    109DFLAGS += -version=Unicode -version=WindowsVista 
     
    1211######################################## 
    1312 
     13SUBDIRS := directx 
     14 
    1415EXCLUSIONS := winsock.d 
    15  
    16 SOURCES := $(filter-out $(EXCLUSIONS), $(wildcard *.d)) 
    17 OBJECTS := $(SOURCES:.d=.obj) 
    18  
    19 LIBS := directx 
    20 LIBRARIES := $(patsubst %,lib/%.lib,$(LIBS)) 
    2116 
    2217######################################## 
    2318 
    24 win32.lib : $(OBJECTS) $(LIBRARIES
    25     $(LIB) -c -p32 $@ $^ 
     19SOURCES := $(wildcard *.d $(addsuffix /*.d, $(SUBDIRS))
     20SOURCES := $(filter-out $(EXCLUSIONS), $(SOURCES)) 
    2621 
    27 %.obj : %.d 
    28     $(DC) $^ -c $(DFLAGS) 
     22######################################## 
    2923 
    30 lib/%.lib : lib 
    31     $(MAKE) -C $* 
    32     move "$*\$*.lib" "$@" 
    33  
    34 lib : 
    35     mkdir lib 
     24win32.lib : $(SOURCES) 
     25    $(DC) $^ -lib -of$@ $(DFLAGS) 
    3626 
    3727clean : 
    38     -del win32.lib *.obj 
     28    -del win32.lib 
    3929 
    40 cleanall : clean 
    41     -del lib\*.lib 
    42     -rmdir lib 
    43     -for %%f in ($(LIBS)) do ($(MAKE) -C %%f cleanall) 
    44  
    45 .PHONY : clean cleanall 
     30.PHONY : clean