File: Makefile

package info (click to toggle)
fastdep 0.16-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 596 kB
  • ctags: 323
  • sloc: cpp: 2,144; ansic: 814; sh: 208; makefile: 124
file content (69 lines) | stat: -rw-r--r-- 1,870 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
all: fastdep

include config/config.me
include build/project.mk
include build/dependencies.mk
include build/release.mk
include build/gnugetopt.mk

include Makefile.common

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
-include .depends-all
endif
endif

BINARY=fastdep

CLASSES=$(foreach group,$(GROUPS),$($(call classgroup,fastdep,$(group))))
SOURCES=$(addsuffix .cc,$(CLASSES))
OBJECTS=$(SOURCES:.cc=.o)
OBJECTS+=$(BUILDSOURCES:.c=.o)

CFLAGS+=-Wall $(foreach include,$(INCLUDEDIRS),-I $(include))

$(OBJECTS): config/config.me $(ALLMAKEFILES)

$(BINARY): $(OBJECTS) $(ALLMAKEFILES)
	g++ $(CFLAGS) $(CXXFLAGS) -o $(BINARY) $(OBJECTS)
# Here is a trick on how to get fastdep linking on older cygwins.
# It's probably also needed to get it working on VC 6.0.
# However, since I am still reworking the build environment for now,
# this is left unmerged.
#ifeq ($(HOST_SYSTEM),cygwin)
#	$(foreach file, $(OBJECTS), $(shell echo $(file) >> linkfiles))
#	g++ $(CFLAGS) $(CXXFLAGS) -o $(BINARY) @linkfiles
#	-rm -f linkfiles
#endif

.cc.o: $(ALLMAKEFILES)
	g++ $(CFLAGS) $(CXXFLAGS) -c $< -o $@

clean:
	-rm -f $(OBJECTS) $(BINARY) .depends-all

distclean:
	-rm -f $(OBJECTS) $(BINARY) .depends-all config/config.me
#$(DEPENDS): $(SOURCES) $(MAKEFILE)
#ifeq ($(HOST_SYSTEM),cygwin)
#	$(foreach file, $(SOURCES), $(shell echo $(file) >> fastdepfiles))
#	$(BINARY) -o $(DEPENDS) @fastdepfiles > $(DEPENDS)
#	-rm -f fastdepfiles
#else
#	./$(BINARY) -o $(DEPENDS) $(SOURCES)
#	$(call depend_dir)
#	$(call depend_dir_test)
#endif

#include $(DEPENDS)

#$(DEPENDS): Makefile.real
.depends-%:
	$(call generate-depends)

config/config.me:
	@echo -e "You must run ./configure first to create config/config.me."
	@echo -e "Use ./configure --help to get information on how to guide the configuration."
	@echo -e "The make process will now exit with an error."
	@exit 1