| 1 | # | 
|---|
| 2 | # Makefile for the src\ directory. | 
|---|
| 3 | # | 
|---|
| 4 |  | 
|---|
| 5 | # | 
|---|
| 6 | #   SUBTARGET is defined by the main makefile to be one of: | 
|---|
| 7 | # | 
|---|
| 8 | #       -- all: this will invoke "nmake all" on the subdirs. | 
|---|
| 9 | # | 
|---|
| 10 | #       -- dep: this will invoke "nmake dep" on the subdirs. | 
|---|
| 11 | # | 
|---|
| 12 |  | 
|---|
| 13 | # Say hello to yourself. | 
|---|
| 14 | !if [@echo +++++ Entering $(MAKEDIR)] | 
|---|
| 15 | !endif | 
|---|
| 16 |  | 
|---|
| 17 | # store current directory so we can change back later | 
|---|
| 18 | CURRENT_DIR = $(MAKEDIR) | 
|---|
| 19 |  | 
|---|
| 20 | SUBDIRS = \ | 
|---|
| 21 | cppbase \ | 
|---|
| 22 | helpers \ | 
|---|
| 23 | libbz2 | 
|---|
| 24 |  | 
|---|
| 25 | # "all" gets called from ..\makefile when either | 
|---|
| 26 | # "nmake all" or "nmake really_all" is running. | 
|---|
| 27 | # In that case, SUBTARGET is "all" also so we | 
|---|
| 28 | # run "nmake all" on the subdirs. | 
|---|
| 29 | all: $(SUBDIRS) | 
|---|
| 30 | @echo ----- Leaving $(MAKEDIR) | 
|---|
| 31 |  | 
|---|
| 32 | # "dep" gets called from ..\makefile when | 
|---|
| 33 | # "nmake dep" is running. | 
|---|
| 34 | # In that case, SUBTARGET is "dep" also so we | 
|---|
| 35 | # run "nmake dep" on the subdirs. | 
|---|
| 36 | dep: $(SUBDIRS) | 
|---|
| 37 | @echo ----- Leaving $(MAKEDIR) | 
|---|
| 38 |  | 
|---|
| 39 | !ifdef RUNDEPONLY | 
|---|
| 40 | SUBMAKESTRING = "NOINCLUDEDEPEND=1" | 
|---|
| 41 | !else | 
|---|
| 42 | SUBMAKESTRING = "OUTPUTDIR_HELPERS=$(OUTPUTDIR_HELPERS)" "CC_HELPERS=$(CC_HELPERS)" | 
|---|
| 43 | !endif | 
|---|
| 44 |  | 
|---|
| 45 | PARENTDIRNAME = src | 
|---|
| 46 |  | 
|---|
| 47 | cppbase: | 
|---|
| 48 | @echo $(MAKEDIR)\makefile [$@]: Going for subdir $(PARENTDIRNAME)\$@ | 
|---|
| 49 | @cd $@ | 
|---|
| 50 | @$(MAKE) -nologo $(SUBTARGET) $(SUBMAKESTRING) "MAINMAKERUNNING=YES" | 
|---|
| 51 | @cd $(CURRENT_DIR) | 
|---|
| 52 |  | 
|---|
| 53 | libbz2: | 
|---|
| 54 | @echo $(MAKEDIR)\makefile [$@]: Going for subdir $(PARENTDIRNAME)\$@ | 
|---|
| 55 | @cd $@ | 
|---|
| 56 | @$(MAKE) -nologo $(SUBTARGET) $(SUBMAKESTRING) "MAINMAKERUNNING=YES" | 
|---|
| 57 | @cd $(CURRENT_DIR) | 
|---|
| 58 |  | 
|---|
| 59 | helpers: | 
|---|
| 60 | @echo $(MAKEDIR)\makefile [$@]: Going for subdir $(PARENTDIRNAME)\$@ | 
|---|
| 61 | @cd $@ | 
|---|
| 62 | @$(MAKE) -nologo $(SUBTARGET) $(SUBMAKESTRING) "MAINMAKERUNNING=YES" | 
|---|
| 63 | @cd $(CURRENT_DIR) | 
|---|
| 64 |  | 
|---|
| 65 | jpeg: | 
|---|
| 66 | @echo $(MAKEDIR)\makefile [$@]: Going for subdir $(PARENTDIRNAME)\$@ | 
|---|
| 67 | @cd $@ | 
|---|
| 68 | @$(MAKE) -nologo $(SUBTARGET) $(SUBMAKESTRING) "MAINMAKERUNNING=YES" | 
|---|
| 69 | @cd $(CURRENT_DIR) | 
|---|
| 70 |  | 
|---|
| 71 | # special targets to build only a subset of the helpers | 
|---|
| 72 |  | 
|---|
| 73 | cp: | 
|---|
| 74 | @echo $(MAKEDIR)\makefile [$@]: Going for subdir $(PARENTDIRNAME)\helpers (cp) | 
|---|
| 75 | @cd helpers | 
|---|
| 76 | @$(MAKE) -nologo cp $(SUBMAKESTRING) "MAINMAKERUNNING=YES" | 
|---|
| 77 | @cd $(CURRENT_DIR) | 
|---|
| 78 |  | 
|---|
| 79 |  | 
|---|