File: Makefile

package info (click to toggle)
elph 1.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 324 kB
  • sloc: cpp: 4,142; makefile: 43; sh: 18
file content (53 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download
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
CLASSDIR := .

# Directories to search for header files
SEARCHDIRS := -I${CLASSDIR}


SYSTYPE :=     $(shell uname)

# C compiler

CXX      := g++
CXXLAGS  = -Wall ${SEARCHDIRS} -fno-exceptions -fno-rtti -D_REENTRANT -g $(shell dpkg-buildflags --get CXXFLAGS)

%.o : %.c
	${CXX} ${CXXLAGS} -c $< -o $@

%.o : %.cc
	${CXX} ${CXXLAGS} -c $< -o $@

%.o : %.C
	${CXX} ${CXXLAGS} -c $< -o $@

%.o : %.cpp
	${CXX} ${CXXLAGS} -c $< -o $@

%.o : %.cxx
	${CXX} ${CXXLAGS} -c $< -o $@

# C/C++ linker

LINKER    := g++
LDFLAGS    =
LOADLIBES := 

.PHONY : all
all:    elph

elph:  ./elph.o ${CLASSDIR}/motif.o ${CLASSDIR}/GBase.o ${CLASSDIR}/GString.o ${CLASSDIR}/GArgs.o
	${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}

# target for removing all object files

.PHONY : tidy
tidy::
	@${RM} core elph *.o ${CLASSDIR}/GBase.o ${CLASSDIR}/GString.o ${CLASSDIR}/GArgs.o

# target for removing all object files

.PHONY : clean
clean:: tidy
	@${RM} core elph *.o ${CLASSDIR}/GBase.o ${CLASSDIR}/GString.o ${CLASSDIR}/GArgs.o