diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-12-06 05:37:41 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-12-06 05:37:41 +0100 |
commit | 915ebf954d4247c4caeaea5a7e40fce30f19e1bc (patch) | |
tree | 6341d69bfbd0159537e94e0fe19480270b913ce8 /Makefile | |
download | ts3db_postgres-915ebf954d4247c4caeaea5a7e40fce30f19e1bc.tar.gz ts3db_postgres-915ebf954d4247c4caeaea5a7e40fce30f19e1bc.tar.xz ts3db_postgres-915ebf954d4247c4caeaea5a7e40fce30f19e1bc.zip |
initial import, some test
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
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 $@ |