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
Show 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
# Solaris (ural2) es Linux ala.
GTEST
=
./gtest
# gtest katalogus helye
ARCH
=
`
uname
`
-
`
uname
-m
`
# architekturahoz tartozo kat. neve
objs
=
komplex_teszt.o komplex.o
# forditando obj. fajlok
OBJECTS
=
komplex_teszt.o komplex.o
# forditando obj. fajlok
HEADERS
=
gtest_lite.h elkeszult.h komplex.h
#
CXX
=
g++
# a C++ fordito neve
#CXX = clang++ # clang-ot (llvm) is erdemes kiprobalni
CXXFLAGS
=
-pedantic
-Wall
# C++ kapcsolok: legyen bobeszedu,
CXXFLAGS
+=
-Wno-long-long
-Wno-variadic-macros
# ... de gtest headerekre ne gerjedjen
CXXFLAGS
+=
-g
# debug info
TARGET
=
komplex_teszt
# alapertelmezett cel: tesztek futtatasa
.PHONY
:
do_test
:
test
./test
# 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
do_test
:
$(TARGET)
./
$(TARGET)
fapados
:
fapados_komplex_teszt.o komplex.o komplex.h
$(CXX)
fapados_komplex_teszt.o komplex.o
-o
$@
$(TARGET)
:
$(OBJECTS) $(HEADERS)
#
nem feltétlen figg mindenki minden headertol
$(CXX)
$(OBJECTS)
-o
$@
# takaritas igeny szerint
.PHONY
:
clean
:
rm
-f
*
.o
test
fapados
*
~
rm
-f
*
.o
$(TARGET)
*
~
*
.cbp
*
.vcxproj
*
# tar igeny szerint
.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