From 915ebf954d4247c4caeaea5a7e40fce30f19e1bc Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 6 Dec 2011 05:37:41 +0100 Subject: initial import, some test --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..14ec492 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +TARGET:=libts3db_own.so +TOP:=. + +headers:=$(wildcard ${TOP}/*.h) +sources:=$(wildcard ${TOP}/*.c) +deps:=$(sources:.c=.d) +objects:=$(sources:.c=.o) + + +32BIT=-m32 +CFLAGS=-fPIC $(32BIT) -g +LDFLAGS=-shared -Wl,-soname,$(TARGET) $(32BIT) + +############################################################################## + +.PHONY: all clean + +all: $(TARGET) + +clean: + -$(RM) -r $(TARGET) $(objects) $(deps) + +ifneq ($(MAKECMDGOALS),clean) +-include $(deps) +endif + +############################################################################## +# normal build + +$(TARGET): $(objects) $(deps) + $(CC) $(LDFLAGS) -o $(TARGET) $(objects) + +%.o: %.c + $(CC) $(CFLAGS) -MMD -c $< -o $@ + +%.d: %.c + $(CC) $(CFLAGS) -MM -c $< -MF $@ -- cgit v1.2.3