Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Prog2
/
labor_peldak
/
lab_03
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a230289e
authored
Feb 26, 2021
by
Szeberényi Imre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile
parent
4618c4b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
22 deletions
+11
-22
Komplex/Makefile
+11
-22
No files found.
Komplex/Makefile
View file @
a230289e
# Pelda Makefile a 3. labor megoldasanak forditasara es tesztelesere
# Pelda Makefile a 3. labor megoldasanak forditasara es tesztelesere
# Solaris (ural2) es Linux ala.
# Solaris (ural2) es Linux ala.
GTEST
=
./gtest
OBJECTS
=
komplex_teszt.o komplex.o
# forditando obj. fajlok
# gtest katalogus helye
HEADERS
=
gtest_lite.h elkeszult.h komplex.h
ARCH
=
`
uname
`
-
`
uname
-m
`
# architekturahoz tartozo kat. neve
#
objs
=
komplex_teszt.o komplex.o
# forditando obj. fajlok
CXX
=
g++
# a C++ fordito neve
CXX
=
g++
# a C++ fordito neve
#CXX = clang++ # clang-ot (llvm) is erdemes kiprobalni
#CXX = clang++ # clang-ot (llvm) is erdemes kiprobalni
CXXFLAGS
=
-pedantic
-Wall
# C++ kapcsolok: legyen bobeszedu,
CXXFLAGS
=
-pedantic
-Wall
# C++ kapcsolok: legyen bobeszedu,
CXXFLAGS
+=
-Wno-long-long
-Wno-variadic-macros
CXXFLAGS
+=
-g
# debug info
# ... de gtest headerekre ne gerjedjen
TARGET
=
komplex_teszt
# alapertelmezett cel: tesztek futtatasa
# alapertelmezett cel: tesztek futtatasa
.PHONY
:
.PHONY
:
do_test
:
test
do_test
:
$(TARGET)
./test
./
$(TARGET)
# tesztprogram linkelese
test
:
$(objs)
$(CXX)
-L
$(GTEST)
/
$(ARCH)
-lgtest_main
-lgtest
$(objs)
-o
$@
# tesztprogram forditasahoz kell a gtest include katalogus
komplex_teszt.o
:
komplex_teszt.cpp
$(CXX)
${
LDFLAGS
}
-I
${
GTEST
}
/include
$(CPPFLAGS)
$(CXXFLAGS)
-c
komplex_teszt.cpp
# ujraforditas, ha valtozik az osztaly felepitese
komplex.o komplex_teszt.o
:
komplex.h
fapados
:
fapados_komplex_teszt.o komplex.o komplex.h
$(TARGET)
:
$(OBJECTS) $(HEADERS)
#
nem feltétlen figg mindenki minden headertol
$(CXX)
fapados_komplex_teszt.o komplex.o
-o
$@
$(CXX)
$(OBJECTS)
-o
$@
# takaritas igeny szerint
# takaritas igeny szerint
.PHONY
:
.PHONY
:
clean
:
clean
:
rm
-f
*
.o
test
fapados
*
~
rm
-f
*
.o
$(TARGET)
*
~
*
.cbp
*
.vcxproj
*
# tar igeny szerint
# tar igeny szerint
.PHONY
:
.PHONY
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment