hl-vt100/Makefile

77 lines
2.3 KiB
Makefile
Raw Normal View History

2011-08-28 19:48:33 +00:00
##
## Makefile for vt100
##
## Made by julien palard
## Login <vt100@mandark.fr>
##
2016-03-03 08:33:07 +00:00
## Copyright (c) 2016 Julien Palard.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
## 1. Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## 2. Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
##
## THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
## IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
## INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
## THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##
2011-08-28 19:48:33 +00:00
NAME = vt100
VERSION = 0
MINOR = 0
RELEASE = 0
LINKERNAME = lib$(NAME).so
SONAME = $(LINKERNAME).$(VERSION)
REALNAME = $(SONAME).$(MINOR).$(RELEASE)
2011-10-15 12:21:57 +00:00
SRC = src/lw_terminal_parser.c src/lw_terminal_vt100.c src/hl_vt100.c
2011-09-27 08:37:21 +00:00
SRC_TEST = src/test.c
2011-08-28 19:48:33 +00:00
OBJ = $(SRC:.c=.o)
OBJ_TEST = $(SRC_TEST:.c=.o)
2011-08-28 19:48:33 +00:00
CC = gcc
2011-09-27 08:37:21 +00:00
INCLUDE = src
2011-08-28 19:48:33 +00:00
DEFINE = _GNU_SOURCE
CFLAGS = -DNDEBUG -g3 -Wextra -Wstrict-prototypes -Wall -ansi -pedantic -fPIC -I$(INCLUDE)
LIB = -lutil
2011-08-28 19:48:33 +00:00
RM = rm -f
$(NAME): $(OBJ)
$(CC) --shared $(OBJ) $(LIB) -o $(LINKERNAME)
test: $(OBJ_TEST)
$(CC) $(OBJ_TEST) -L . -l$(NAME) -o test
2011-08-28 19:48:33 +00:00
2011-10-22 14:45:31 +00:00
python_module:
swig -python -threads *.i
2011-10-22 14:45:31 +00:00
2011-08-28 19:48:33 +00:00
all:
@make $(NAME)
.c.o:
$(CC) -D $(DEFINE) -c $(CFLAGS) $< -o $(<:.c=.o)
2011-10-22 14:45:31 +00:00
clean_python_module:
$(RM) *.pyc *.so hl_vt100_wrap.c hl_vt100.py
$(RM) -r build
clean: clean_python_module
2011-09-27 08:37:21 +00:00
$(RM) $(LINKERNAME) test src/*~ *~ src/\#*\# src/*.o \#*\# *.o *core
2011-08-28 19:48:33 +00:00
re: clean all
check-syntax:
2011-10-04 07:11:06 +00:00
gcc -Isrc -Wall -Wextra -ansi -pedantic -o /dev/null -S ${CHK_SOURCES}