better makefile
This commit is contained in:
parent
4a5e2b0350
commit
611bfa9343
29
Makefile
29
Makefile
|
@ -1,10 +1,23 @@
|
||||||
# sorry this makefile doesn't include anything cross-platform
|
CC=
|
||||||
# was hurriedly made to test it
|
MKDIR=
|
||||||
|
PCFLAGS=
|
||||||
|
PLFLAGS=
|
||||||
|
LFLAGS=-shared -g -ggdb
|
||||||
|
CFLAGS=--std=c99 -g -ggdb -Wall
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
|
CC += mingw32-gcc
|
||||||
|
MKDIR += mkdir -p
|
||||||
|
PLFLAGS += -Wl,--out-implib,bin/libLoveToken.a
|
||||||
|
else
|
||||||
|
ifeq ($(shell uname -s), Linux)
|
||||||
|
CC += gcc
|
||||||
|
MKDIR += mkdir -p
|
||||||
|
PCFLAGS += -fPIC
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
all:
|
all:
|
||||||
mkdir -p bin
|
$(MKDIR) bin
|
||||||
mingw32-gcc --std=c99 -g -ggdb -c -o bin/lt.o src/lt.c -liconv
|
$(CC) $(CFLAGS) $(PCFLAGS) -c -o bin/lt.o src/lt.c
|
||||||
mingw32-gcc -shared -g -ggdb -o bin/LoveToken.dll bin/lt.o -Wl,--out-implib,bin/libLoveToken.a -liconv
|
$(CC) $(LFLAGS) -o bin/LoveToken.dll bin/lt.o $(PLFLAGS) -liconv
|
||||||
#mingw32-gcc --std=c99 -g -ggdb -c -o bin/lt.o -DI_FUCKING_HATE_WINDOWS src/lt.c
|
|
||||||
#mingw32-gcc -shared -g -ggdb -o bin/LoveToken.dll bin/iconv.o bin/lt.o -Wl,--out-implib,bin/libLoveToken.a
|
|
||||||
#cp bin/LoveToken.dll test/LoveToken.dll
|
|
||||||
|
|
Reference in New Issue
Block a user