cleanup Makefile

This commit is contained in:
Yuichi Nishiwaki 2013-11-09 18:05:59 +09:00
parent 71b0f8c686
commit d415e5cbaf
1 changed files with 4 additions and 9 deletions

View File

@ -1,16 +1,11 @@
CC=gcc
CFLAGS=-Wall -O3
UNAME_S := $(shell uname -s)
SO_PREFIX=lib
SO_EXT=.so
PICRIN_LIB=libpicrin.so
ifeq ($(findstring CYGWIN,$(UNAME_S)), CYGWIN)
SO_PREFIX=cyg
SO_EXT=.dll
ifeq ($(findstring CYGWIN,$(shell uname -s)), CYGWIN)
PICRIN_LIB =cygpicrin.dll
endif
PICRIN_LIB=$(SO_PREFIX)picrin$(SO_EXT)
all: build-debug run
release: CFLAGS += -DDEBUG=0
@ -33,7 +28,7 @@ build-lib:
clean:
rm -f src/y.tab.c src/y.tab.h src/lex.yy.c
rm -f lib/$(PICRIN_LIB)
rm -f lib/$(PICRIN_LIB) bin/$(PICRIN_LIB)
rm -f bin/picrin
run: