Switch from meson to plain makefile

master
Drew DeVault 7 years ago
parent 05694b0dc3
commit a1b614bd62
  1. 4
      .gitignore
  2. 19
      COPYING
  3. 43
      Makefile
  4. 29
      meson.build

4
.gitignore vendored

@ -1 +1,3 @@
build
.build
scdoc
scdoc.1

@ -0,0 +1,19 @@
Copyright © 2017 Drew DeVault
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,43 @@
CC=cc
CFLAGS=-Wall -Wextra -Werror -Wno-unused-parameter
LDFLAGS=-static
INCLUDE=-Iinclude
PREFIX=/usr/local
DESTDIR=
_INSTDIR=$(DESTDIR)$(PREFIX)
BINDIR=$(_INSTDIR)/bin
MANDIR=$(_INSTDIR)/share/man
.DEFAULT_GOAL=all
OBJECTS=\
.build/main.o \
.build/string.o \
.build/utf8_chsize.o \
.build/utf8_decode.o \
.build/utf8_encode.o \
.build/utf8_fgetch.o \
.build/utf8_fputch.o \
.build/utf8_size.o \
.build/util.o
.build/%.o: src/%.c
@mkdir -p .build
$(CC) -std=c99 -c -o $@ $(CFLAGS) $(INCLUDE) $<
scdoc: $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^
scdoc.1: scdoc.1.scd scdoc
./scdoc < $< > $@
all: scdoc scdoc.1
clean:
rm -rf .build scdoc
install: all
mkdir -p $(DESTDIR)
install -Dm755 scdoc $(BINDIR)/scdoc
install -Dm644 scdoc.1 $(MANDIR)/scdoc.1
.PHONY: all clean install

@ -1,29 +0,0 @@
# TODO: Just use a makefile
project(
'scdoc',
'c',
license: 'MIT',
meson_version: '>=0.43.0',
default_options: [
'c_std=c99',
'warning_level=2',
'werror=true',
],
)
add_project_arguments('-Wno-unused-parameter', language: 'c')
executable(
'scdoc', [
'src/main.c',
'src/string.c',
'src/utf8_chsize.c',
'src/utf8_decode.c',
'src/utf8_encode.c',
'src/utf8_fgetch.c',
'src/utf8_fputch.c',
'src/utf8_size.c',
'src/util.c',
],
include_directories: include_directories('include')
)
Loading…
Cancel
Save