makefile changes
This commit is contained in:
parent
cdb6207632
commit
aa4ed6730b
8
Makefile
8
Makefile
|
@ -5,10 +5,10 @@ PCFLAGS=
|
||||||
PLFLAGS=
|
PLFLAGS=
|
||||||
LIBNAME=
|
LIBNAME=
|
||||||
OUTDIR=bin
|
OUTDIR=bin
|
||||||
|
SRCDIR=src
|
||||||
LFLAGS=-shared -g -ggdb
|
LFLAGS=-shared -g -ggdb
|
||||||
CFLAGS=--std=c99 -g -ggdb -O2 -Wall
|
CFLAGS=--std=c99 -g -ggdb -O2 -Wall
|
||||||
RMEXTRA=
|
RMEXTRA=
|
||||||
EXAMPLEBIN=
|
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
CC+=mingw32-gcc
|
CC+=mingw32-gcc
|
||||||
|
@ -29,11 +29,11 @@ endif
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(MKDIR) $(OUTDIR)
|
$(MKDIR) $(OUTDIR)
|
||||||
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $(OUTDIR)/lt.o src/lt.c
|
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $(OUTDIR)/lt.o $(SRCDIR)/lt.c
|
||||||
$(CC) $(LFLAGS) -o $(LIBNAME) $(OUTDIR)/lt.o $(PLFLAGS) -liconv
|
$(CC) $(LFLAGS) -o $(LIBNAME) $(OUTDIR)/lt.o $(PLFLAGS) -liconv
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(LIBNAME) bin/lt.o $(RMEXTRA)
|
$(RM) $(LIBNAME) $(OUTDIR)/lt.o $(RMEXTRA)
|
||||||
|
|
||||||
example:
|
example:
|
||||||
$(CC) $(CFLAGS) -Isrc -Lbin -o bin/example examples/main.c -lLoveToken
|
$(CC) $(CFLAGS) -Isrc -L$(OUTDIR) -o $(OUTDIR)/example examples/main.c -lLoveToken
|
||||||
|
|
Reference in New Issue
Block a user