weighttp/debian/patches/0001-Makefile-to-replace-wa...

38 lines
803 B
Diff

From: =?UTF-8?q?Stefan=20B=C3=BChler?= <stbuehler@web.de>
Date: Fri, 10 May 2013 13:48:29 +0200
Subject: Makefile to replace waf handling
---
Makefile | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 Makefile
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..741b8a1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+
+all: weighttp
+
+override SOURCES := $(wildcard src/*.c)
+override OBJECTS := $(patsubst %.c,%.o,$(SOURCES))
+
+# VERSION must be set in env
+
+LIBS += -lev -lpthread
+override CFLAGS += '-DVERSION="$(VERSION)"'
+
+weighttp: $(OBJECTS)
+ $(CC) $(LDFLAGS) -o weighttp $^ $(LIBS)
+
+install: weighttp
+ mkdir -p $(DESTDIR)/usr/bin
+ cp weighttp $(DESTDIR)/usr/bin/
+
+clean:
+ rm -f weighttp $(OBJECTS)
+
+.PHONY: all install clean