diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-12 17:58:06 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-13 07:54:07 +0100 |
| commit | 62ee3ef1ca13872e1f9b07f6e4e53cea8b684d72 (patch) | |
| tree | d0c6844356820c3716a24e76ee3912d8e6ec1cf9 /Makefile | |
| parent | 438fe10b069b355407cd42b244de5deb695f2338 (diff) | |
| download | libweb-62ee3ef1ca13872e1f9b07f6e4e53cea8b684d72.tar.gz | |
Replace Makefile with configure script
Since libweb depends on dynstr, this dependency can be already available
on the system, and therefore the CFLAGS and LDFLAGS should be updated
according to pkg-config(1), rather than hardcoding them to the source
tree.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index af79de3..0000000 --- a/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -.POSIX: - -PROJECT = libweb -PROJECT_A = $(PROJECT).a -MAJOR_VERSION = 0 -MINOR_VERSION = 1 -PATCH_VERSION = 0 -VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION) -PROJECT_SO = $(PROJECT).so.$(VERSION) -PROJECT_SO_FQ = $(PROJECT).so.$(MAJOR_VERSION) -PROJECT_SO_NV = $(PROJECT).so -prefix = /usr/local -exec_prefix = $(prefix) -includedir = $(prefix)/include -datarootdir = $(prefix)/share -mandir = $(datarootdir)/man -libdir = $(exec_prefix)/lib -pkgcfgdir = $(libdir)/pkgconfig -O = -O1 -CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit. -CFLAGS = $(O) $(CDEFS) -g -Iinclude -Idynstr/include -fPIC -MD -MF $(@:.o=.d) -LDFLAGS = -shared -DEPS = $(OBJECTS:.o=.d) -OBJECTS = \ - form.o \ - handler.o \ - html.o \ - http.o \ - server.o \ - wildcard_cmp.o - -all: $(PROJECT_A) $(PROJECT_SO) - -install: all $(pkgcfgdir)/libweb.pc - mkdir -p $(DESTDIR)$(includedir) - cp -R include/libweb $(DESTDIR)$(includedir) - chmod 0644 $(DESTDIR)$(includedir)/libweb/*.h - mkdir -p $(DESTDIR)$(libdir) - cp $(PROJECT_A) $(PROJECT_SO) $(DESTDIR)$(libdir) - chmod 0755 $(libdir)/$(PROJECT_A) $(DESTDIR)$(libdir)/$(PROJECT_SO) - ln -fs $(libdir)/$(PROJECT_SO) $(DESTDIR)$(libdir)/$(PROJECT_SO_FQ) - ln -fs $(libdir)/$(PROJECT_SO) $(DESTDIR)$(libdir)/$(PROJECT_SO_NV) - +cd doc && $(MAKE) install \ - DESTDIR=$(DESTDIR) \ - prefix=$(prefix) \ - datarootdir=$(datarootdir) \ - mandir=$(mandir) - -clean: - rm -f $(OBJECTS) $(DEPS) - +cd examples && $(MAKE) clean - -distclean: clean - rm -f $(PROJECT_A) $(PROJECT_SO) - +cd examples && $(MAKE) distclean - -FORCE: - -examples: FORCE - +cd examples && $(MAKE) - -$(PROJECT_A): $(OBJECTS) - $(AR) $(ARFLAGS) $@ $(OBJECTS) - -$(PROJECT_SO): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) -o $@ - -$(pkgcfgdir)/libweb.pc: libweb.pc - mkdir -p $(pkgcfgdir) - sed -e 's,/usr/local,$(prefix),' $< > $@ - chmod 0644 $@ - --include $(DEPS) |
