Added $(OUTDIR) to Makefile
This commit is contained in:
parent
1355b115ae
commit
88cf4e2f37
11
Makefile
11
Makefile
|
@ -3,6 +3,7 @@ MKDIR=
|
||||||
PCFLAGS=
|
PCFLAGS=
|
||||||
PLFLAGS=
|
PLFLAGS=
|
||||||
LIBNAME=
|
LIBNAME=
|
||||||
|
OUTDIR=bin
|
||||||
LFLAGS=-shared -g -ggdb
|
LFLAGS=-shared -g -ggdb
|
||||||
CFLAGS=--std=c99 -g -ggdb -Wall
|
CFLAGS=--std=c99 -g -ggdb -Wall
|
||||||
|
|
||||||
|
@ -10,17 +11,17 @@ ifeq ($(OS),Windows_NT)
|
||||||
CC+=mingw32-gcc
|
CC+=mingw32-gcc
|
||||||
MKDIR+=mkdir -p
|
MKDIR+=mkdir -p
|
||||||
PLFLAGS+=-Wl,--out-implib,bin/libLoveToken.a
|
PLFLAGS+=-Wl,--out-implib,bin/libLoveToken.a
|
||||||
LIBNAME+=bin/LoveToken.dll
|
LIBNAME+=$(OUTDIR)/LoveToken.dll
|
||||||
else
|
else
|
||||||
ifeq ($(shell uname -s), Linux)
|
ifeq ($(shell uname -s), Linux)
|
||||||
CC+=gcc
|
CC+=gcc
|
||||||
MKDIR+=mkdir -p
|
MKDIR+=mkdir -p
|
||||||
PCFLAGS+=-fPIC
|
PCFLAGS+=-fPIC
|
||||||
LIBNAME+=bin/lovetoken.so
|
LIBNAME+=$(OUTDIR)/lovetoken.so
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(MKDIR) bin
|
$(MKDIR) $(OUTDIR)
|
||||||
$(CC) $(CFLAGS) $(PCFLAGS) -c -o bin/lt.o src/lt.c
|
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $(OUTDIR)/lt.o src/lt.c
|
||||||
$(CC) $(LFLAGS) -o $(LIBNAME) bin/lt.o $(PLFLAGS) -liconv
|
$(CC) $(LFLAGS) -o $(LIBNAME) $(OUTDIR)/lt.o $(PLFLAGS) -liconv
|
||||||
|
|
Reference in New Issue
Block a user