mirror of
https://gitlab.com/klmp200/LO27.git
synced 2024-11-05 10:58:02 +00:00
Added a first ver of the makefile
This commit is contained in:
parent
b92fcc50a9
commit
721eb1f55d
35
Makefile
Normal file
35
Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
CXX = gcc
|
||||
TARGET = exe
|
||||
SOURCEFILE = main
|
||||
CFLAGS = -Wall -Werror -I. -ansi -pedantic -fpic -g
|
||||
LIST_LIBRARY = matrix/libMatrix
|
||||
|
||||
#Generating the executable
|
||||
$(TARGET): $(SOURCEFILE).o
|
||||
@echo "Generating the executable"
|
||||
$(CXX) $(CFLAGS) $(SOURCEFILE).o -o $(TARGET)
|
||||
|
||||
$(SOURCEFILE).o: $(LIST_LIBRARY).so
|
||||
@echo "Generating $(SOURCEFILE).o"
|
||||
$(CXX) $(CFLAGS) -Lmatrix -lmatrix -c $(SOURCEFILE).c -o $@ -LlibMatrix -llibMatrix.so
|
||||
|
||||
$(LIST_LIBRARY).so:clean
|
||||
@echo "Generating libMatrix.so" $@
|
||||
#gcc matrix.c -I. -Wall -Werror -fpic -shared -o $(LIST_LIBRARY).so
|
||||
$(CXX) -Wall -Werror -ansi -pedantic -I. matrix.c -o $(LIST_LIBRARY).so -shared -fpic
|
||||
|
||||
|
||||
#Cleaning the executable
|
||||
clean:
|
||||
@echo "Cleaning temporary files and libMatrix.so"
|
||||
rm -rf *.o *- *.so $(TARGET)
|
||||
rm -rf $(LIST_LIBRARY).so
|
||||
#Generating library
|
||||
lib:
|
||||
@echo "Generating libMatrix.so"
|
||||
$(CXX) -Wall -Werror -ansi -pedantic -I. matrix.c -o $(LIST_LIBRARY).so -shared -fpic
|
||||
|
||||
release:
|
||||
@echo "Generating a release version of the program"
|
||||
make CFLAGS= '-Wall -Werror -I. -ansi -pedantic -fpic'
|
||||
|
Loading…
Reference in New Issue
Block a user