Makefile 956 Bytes
Newer Older
1
2
dir_targets := distribution_methods
objects1 := CommDist
3
4
5
6
objects2 := malleabilityTypes ProcessDist
objects3 := malleabilityZombies
objects4 := malleabilityManager
DEPENDS := $(addsuffix .h, malleabilityDataStructures malleabilityStates)
7
8
CC := gcc
MCC := mpicc
9
CFLAGS := -Wall -Wextra
10
11
12

.PHONY: $(dir_targets) subdir

13
all: subdir $(objects1) $(objects2) $(objects3) $(objects4)
14
15
16
17
18

subdir: $(dir_targets)
$(dir_targets): %:
	$(MAKE) -C $@

19
$(objects1): %: %.c %.h $(DEPENDS) $(dir_targets)/block_distribution.h
20
21
	$(MCC) $(CFLAGS) -c -o $(BUILDDIR)/$@.o $<

22
$(objects2): %: %.c %.h $(DEPENDS)
23
24
	$(MCC) $(CFLAGS) -c -o $(BUILDDIR)/$@.o $<

25
$(objects3): %: %.c %.h $(DEPENDS) $(TOP)/IOcodes/results.h
26
27
	$(MCC) $(CFLAGS) -c -o $(BUILDDIR)/$@.o $<

28
29
30
$(objects4): %: %.c %.h $(objects1).h $(objects2).h $(objects3).h $(DEPENDS) \
	                $(TOP)/IOcodes/read_ini.h $(TOP)/IOcodes/results.h $(TOP)/Main/Main_datatypes.h
	$(MCC) $(CFLAGS) -c -o $(BUILDDIR)/$@.o $<