File: Makefile

package info (click to toggle)
octave-fixed 0.7.6-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,052 kB
  • ctags: 1,494
  • sloc: cpp: 15,961; makefile: 210; sh: 22
file content (62 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download | duplicates (3)
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
sinclude ../src/Makeconf

LINKTARGETS = fifft.oct
LINKSOURCE = ffft.oct
SOURCES = $(wildcard *.cc)
TARGETS = $(patsubst %.cc,%.oct,$(SOURCES)) $(LINKTARGETS)
OBJECTS = $(patsubst %.cc,%.o,$(SOURCES))
DEPENDS = $(patsubst %.cc,%.d,$(SOURCES))
INCLUDES = -I../src
DEFINES = 

ifneq (,$(findstring cygwin,$(canonical_host_type)))
   MOFLAGS = -L../src -lfixed
endif
ifneq (,$(findstring mingw,$(canonical_host_type)))
   MOFLAGS = -L../src -lfixed
endif
ifneq (,$(findstring msdosmsvc,$(canonical_host_type)))
   MOFLAGS = -L../src -lfixed
endif

.PHONY: all clean count
%.oct : %.cc 
.SUFFIXES:
.SUFFIXES: .cc .oct .o .h
# This stuff doesn't build on OS X at the moment. Till someone
# fixes it, disable the build...
ifeq (,$(findstring darwin,$(canonical_host_type)))
all: $(DEPENDS) $(OBJECTS) $(TARGETS)
else
all:
	@echo "****** WARNING: Building of examples disabled for Darwin";
endif

ifneq (,$(wildcard *.d))
include $(wildcard *.d)
endif

$(LINKTARGETS) :
	@echo "Symbolic linking $@ to $(LINKSOURCE)"; \
	$(RM) $@; \
	$(LN_S) $(LINKSOURCE) $@

%.oct: %.d %.o
	@echo "Linking $@"; \
	$(MKOCTFILE) $(MOFLAGS) $(@:.oct=.o) -o $@

%.d: %.cc
	@echo "Depending $<"; \
	$(MKOCTFILE) $(INCLUDES) $(DEFINES) -M $<

%.o: %.cc
	@echo "Compiling $@"; \
	$(MKOCTFILE) $(INCLUDES) $(DEFINES) -c $< 

clean:
	@echo "Cleaning..."; \
	$(RM) $(OBJECTS) $(DEPENDS) $(TARGETS) *~ octave-core *.ps

count:
	wc *{.cc,.h}