mirror of
https://gitlab.com/klmp200/LO27.git
synced 2024-11-23 03:33:19 +00:00
35 lines
752 B
Makefile
35 lines
752 B
Makefile
|
CC=gcc
|
||
|
CFLAGS=-Wall -Werror -pedantic -fpic -g -std=c89
|
||
|
|
||
|
|
||
|
LIBSDIR=-L/usr/lib -L../Libs
|
||
|
INCLUDEDIR=-I/usr/include -I. -I../LibAutomaton
|
||
|
|
||
|
#Library variables
|
||
|
LIBTARGET=libGui.so
|
||
|
LIBSOURCE=pixel
|
||
|
LIBSOURCECFILE=$(LIBSOURCE:=.c)
|
||
|
LIBSOURCEOFILE=$(LIBSOURCE:=.o)
|
||
|
|
||
|
DEPENDENCELIST=libAutomaton.so
|
||
|
DEPENDENCENAMELIST=Automaton
|
||
|
|
||
|
EXTLIBS=`sdl2-config --cflags --libs`
|
||
|
|
||
|
#Generating the library binary
|
||
|
$(LIBTARGET): $(LIBSOURCEOFILE)
|
||
|
@echo "\n Generating the library binary"
|
||
|
$(CC) $(CFLAGS) $(LIBSDIR) $(EXTLIBS) -l$(DEPENDENCENAMELIST) -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
|
||
|
|
||
|
|