From fb0c2e4416d7a54f5318710b256dd794cc8317c8 Mon Sep 17 00:00:00 2001 From: mescalinum Date: Thu, 22 Oct 2009 20:03:06 +0000 Subject: atoi and atof externals svn path=/trunk/externals/ffext/; revision=12645 --- atox/Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 atox/Makefile (limited to 'atox/Makefile') diff --git a/atox/Makefile b/atox/Makefile new file mode 100644 index 0000000..fc76385 --- /dev/null +++ b/atox/Makefile @@ -0,0 +1,47 @@ +#!/usr/bin/make + +DEBUG?=0 +OS := $(shell uname -s) + +ifeq ($(DEBUG),1) + CFLAGS += -O0 -g -ggdb -DDEBUG +endif +ifeq ($(OS),Linux) + PDSUF = .pd_linux + PDBUNDLEFLAGS = -shared -rdynamic + LDSOFLAGS = -lm +endif +ifeq ($(OS),Darwin) + PDSUF = .pd_darwin + INCLUDES = -I/Library/Frameworks/Tcl.framework/Headers + PDBUNDLEFLAGS = -bundle -flat_namespace -undefined dynamic_lookup + LDSOFLAGS = -lm +endif +ifeq (MINGW,$(findstring MINGW,$(UNAME))) + PDSUF = .dll + PDBUNDLEFLAGS = -shared + LDSOFLAGS = -lm +endif + +INCLUDES = -I../../pd/src -I/usr/include +CFLAGS += -Wall -fPIC +CFLAGS += -DPDSUF=\"$(PDSUF)\" +ifeq ($(DEBUG),0) + CFLAGS += -O2 +endif + +all: atoi.pd_linux atof.pd_linux + +clean: + rm -f *.pd_linux *.o *~ atoi.c atof.c + +atoi.c: atox.c + sed -e s/ATOX/$*/g $< > $@ + +atof.c: atox.c + sed -e s/ATOX/$*/g $< > $@ + +.SUFFIXES: .c .o $(PDSUF) + +.o$(PDSUF): + $(CC) $(PDBUNDLEFLAGS) $(CFLAGS) $(INCLUDES) -o $*$(PDSUF) $< $(LDSOFLAGS) -- cgit v1.2.1