2016-12-10 04:04:13 +00:00
|
|
|
CC=gcc
|
|
|
|
CFLAGS=-Wall -Werror -pedantic -fpic -g
|
|
|
|
|
|
|
|
|
2016-12-10 23:33:02 +00:00
|
|
|
LIBSDIR=-L/usr/lib -L../Libs
|
2016-12-10 04:04:13 +00:00
|
|
|
INCLUDEDIR=-I/usr/include -I.
|
|
|
|
|
|
|
|
#Library variables
|
|
|
|
LIBTARGET=libList.so
|
|
|
|
LIBSOURCE=list CellElement
|
|
|
|
LIBSOURCECFILE=$(LIBSOURCE:=.c)
|
|
|
|
LIBSOURCEOFILE=$(LIBSOURCE:=.o)
|
|
|
|
|
|
|
|
#Generating the library binary
|
|
|
|
$(LIBTARGET): $(LIBSOURCEOFILE)
|
|
|
|
@echo "\n Generating the library binary"
|
|
|
|
$(CC) $(CFLAGS) -shared $(LIBSOURCEOFILE) -o ../Libs/$(LIBTARGET)
|
|
|
|
|
|
|
|
#Generating object files
|
|
|
|
.c.o:
|
|
|
|
@echo "\n Generating " $@ " from " $<
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDEDIR) -c -o $@ $<
|
|
|
|
|
|
|
|
#Cleaning
|
|
|
|
clean:
|
|
|
|
@echo "\n Cleaning"
|
|
|
|
rm -rf *.o *.exe *.so
|
|
|
|
|
|
|
|
|