libsysutils
diff Makefile @ 1:c1323f9f202d
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 05 May 2015 05:51:56 +0300 |
parents | a8277d8f687a |
children |
line diff
1.1 --- a/Makefile Thu Feb 19 01:33:54 2015 +0200 1.2 +++ b/Makefile Tue May 05 05:51:56 2015 +0300 1.3 @@ -1,3 +1,5 @@ 1.4 +PREFIX ?= /usr/local 1.5 + 1.6 src = $(wildcard src/*.c) 1.7 obj = $(src:.c=.o) 1.8 name = sysutils 1.9 @@ -11,7 +13,7 @@ 1.10 ifeq ($(sys), Darwin) 1.11 lib_so = lib$(name).dylib 1.12 shared = -dynamiclib 1.13 -else ($(sys), Win32) 1.14 +else ifeq ($(sys), Win32) 1.15 lib_so = $(name).dll 1.16 # TODO shared = ? 1.17 else # any other unix 1.18 @@ -22,6 +24,10 @@ 1.19 pic = -fPIC 1.20 endif 1.21 1.22 +inc = -Iinclude -Isrc 1.23 + 1.24 +CFLAGS = -pedantic -Wall -g $(pic) $(inc) 1.25 + 1.26 .PHONY: all 1.27 all: $(lib_so) $(lib_a) 1.28 1.29 @@ -29,7 +35,7 @@ 1.30 $(AR) rcs $@ $(obj) 1.31 1.32 $(lib_so): $(obj) 1.33 - $(CC) -o $@ $(obj) $(LDFLAGS) 1.34 + $(CC) -o $@ $(shared) $(obj) $(LDFLAGS) 1.35 1.36 .PHONY: clean 1.37 clean: