mirror of
https://github.com/Hizenberg469/C1-Linux_SYS_Prog-AS-.git
synced 2026-04-20 02:42:23 +03:00
How to make Makefile?
This commit is contained in:
26
Makefile_Assignment/Makefile
Normal file
26
Makefile_Assignment/Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
TARGET: exemath
|
||||
exemath: main.o libcalc.a
|
||||
gcc main.o -o exemath -L . libcalc.a -lm
|
||||
|
||||
libcalc.a: trig_math/trig_math.o common_math/common_math.o complex_math/complex_math.o
|
||||
ar rs libcalc.a common_math/common_math.o complex_math/complex_math.o trig_math/trig_math.o
|
||||
|
||||
common_math.o: common_math/common_math.c
|
||||
gcc -c -I common_math common_math/common_math.c -o common_math/common_math.o
|
||||
|
||||
complex_math.o: complex_math/complex_math.c
|
||||
gcc -c -I complex_math complex_math/complex_math.c -o complex_math/complex_math.o
|
||||
|
||||
trig_math.o: trig_math/trig_math.c
|
||||
gcc -c -I trig_math trig_math/trig_math.c -o trig_math/trig_math.o
|
||||
|
||||
main.o: main.c
|
||||
gcc -c -I common_math -I complex_math -I trig_math main.c -o main.o
|
||||
|
||||
clean:
|
||||
rm common_math/common_math.o
|
||||
rm complex_math/complex_math.o
|
||||
rm trig_math/trig_math.o
|
||||
rm main.o
|
||||
rm libcalc.a
|
||||
rm exemath
|
||||
Reference in New Issue
Block a user