evil-qemacs/libqhtml/Makefile

89 lines
2.2 KiB
Makefile
Raw Normal View History

2008-06-04 08:49:24 +00:00
# Libqhtml tiny HTML/CSS rendering library for QEmacs
#
# Copyright (c) 2000-2002 Fabrice Bellard.
# Copyright (c) 2000-2014 Charlie Gordon.
2008-06-04 08:49:24 +00:00
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
DEPTH=..
include $(DEPTH)/config.mak
2004-05-29 10:17:37 +00:00
ifeq ($(CC),gcc)
CFLAGS += -Wall -g -O2 -funsigned-char
# do not warn about zero-length formats.
CFLAGS += -Wno-format-zero-length
LDFLAGS := -g
endif
#include local compiler configuration file
2008-06-04 08:49:24 +00:00
-include $(DEPTH)/cflags.mk
2004-05-29 10:17:37 +00:00
ifdef TARGET_GPROF
CFLAGS += -p
LDFLAGS += -p
2004-05-29 10:17:37 +00:00
endif
2004-05-29 10:17:37 +00:00
ifdef TARGET_ARCH_X86
2008-06-04 08:49:24 +00:00
#CFLAGS+=-fomit-frame-pointer
ifeq ($(GCC_MAJOR),2)
CFLAGS+=-m386 -malign-functions=0
else
CFLAGS+=-march=i386 -falign-functions=0
endif
2004-05-29 10:17:37 +00:00
endif
2008-06-04 08:49:24 +00:00
CFLAGS+=-I$(DEPTH)
2004-05-29 10:17:37 +00:00
LIB= libqhtml.a
OBJS= css.o xmlparse.o cssparse.o html_style.o docbook_style.o
DEPENDS:= qe.h config.h cutils.h display.h qestyles.h config.mak
DEPENDS:= $(addprefix $(DEPTH)/, $(DEPENDS))
OBJS_DIR:= $(DEPTH)/.objs/libqhtml
OBJS:= $(addprefix $(OBJS_DIR)/, $(OBJS))
2008-06-04 08:49:24 +00:00
$(shell mkdir -p $(OBJS_DIR))
2004-05-29 10:17:37 +00:00
#
# Dependencies
#
2004-05-29 10:17:37 +00:00
all: $(LIB)
$(LIB): $(OBJS) Makefile
2004-05-29 10:17:37 +00:00
rm -f $@
$(AR) rc $@ $(OBJS)
$(OBJS_DIR)/%.o: %.c $(DEPENDS) Makefile
2007-12-18 12:20:28 +00:00
$(CC) $(DEFINES) $(CFLAGS) -o $@ -c $<
2004-05-29 10:17:37 +00:00
#
# build default style sheet file
#
csstoqe$(EXE): csstoqe.c Makefile
2004-05-29 10:17:37 +00:00
$(HOST_CC) $(CFLAGS) -o $@ $<
html_style.c: html.css csstoqe$(EXE) Makefile
2004-05-29 10:17:37 +00:00
./csstoqe html_style < $< > $@
docbook_style.c: docbook.css csstoqe$(EXE) Makefile
2004-05-29 10:17:37 +00:00
./csstoqe docbook_style < $< > $@
2008-06-04 08:49:24 +00:00
clean:
rm -rf *.dSYM
2008-06-04 08:49:24 +00:00
rm -f *~ *.o *.a *.exe *_g TAGS gmon.out core *.exe.stackdump \
csstoqe html_style.c docbook_style.c \
$(OBJS_DIR)/*.o