summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8b173c3519002b0d010643aa1dd4dadffd8ee1fd (plain)
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
# Temporary makefile for the CCTK

TOP              := $(shell pwd)

SHELL             = /bin/sh
MKDIR             = mkdir -p
CC                = egcs
CXX               = $(CC)
F90               = f90
F77               = f77
CPP               = cc -E -M
LD                = $(CXX)
AR                = /bin/ar rucs
RANLIB            = touch
AWK               = awk

INC_DIRS         += src/include

CFLAGS           += -g $(INC_DIRS:%=-I%)
CXXFLAGS         += -g $(INC_DIRS:%=-I%)


CSRCS := $(shell find src -name '*.c')
CCSRCS := $(shell find src -name '*.cc')
OBJS = $(CSRCS:%.c=%.o) $(CCSRCS:%.cc=%.o)
HEADERS := $(shell find src/include -name '*.h')


cctk: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $+ $(LOADLIBS)

$(OBJS): $(HEADERS)

clean:
	find src -name '*.o' -exec rm {} \;

tags:
	etags `find src -name '*.[ch]' -o -name '*.cc'`