quakeforge/tools/qfcc/source/Makefile.am
Bill Currie f14d8060e0 Merge qfpc into qfcc.
Since gnu bison and flex are required anyway, no harm in using their api
prefix options. Now, qfcc can compile both QC/Ruamoko and Pascal files
(Pascal is (currently?) NOT supported in progs.src mode), selecting the
language based on the extension: .r, .qc and .c select QC/Ruamoko, .pas and
.p select Pascal, while anything else is treated as an object file (as
before).
2012-10-26 16:01:41 +09:00

70 lines
2.1 KiB
Makefile

## Process this file with automake to produce Makefile.in
#
# Makefile.am
#
# Automake-using build system for QuakeForge
#
# Copyright (C) 2000 Jeff Teunissen <deek@quakeforge.net>
#
# This Makefile is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to:
#
# Free Software Foundation, Inc.
# 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA
#
# $Id$
#
AUTOMAKE_OPTIONS= foreign
QFCC_LIBS=@QFCC_LIBS@
QFCC_DEPS=@QFCC_DEPS@
QFCC_INCS=@QFCC_INCS@
INCLUDES= -I$(top_srcdir)/include $(QFCC_INCS)
YFLAGS = -v -d
bin_PROGRAMS= qfcc qfprogs
bin_SCRIPTS= qfpreqcc
common_src=\
class.c codespace.c constfold.c cpp.c debug.c def.c defspace.c \
diagnostic.c dot_expr.c dot_flow.c emit.c expr.c function.c grab.c \
idstuff.c linker.c method.c obj_file.c obj_type.c opcodes.c options.c \
qfcc.c reloc.c shared.c statements.c strpool.c struct.c switch.c symtab.c \
type.c value.c
qfcc_SOURCES= qc-lex.l qc-parse.y qp-lex.l qp-parse.y $(common_src)
qfcc_LDADD= $(QFCC_LIBS)
qfcc_DEPENDENCIES= $(QFCC_DEPS)
qfprogs_SOURCES= \
disassemble.c dump_globals.c dump_lines.c dump_modules.c obj_file.c \
stub.c qfprogs.c dump_strings.c
qfprogs_LDADD= $(QFCC_LIBS)
qfprogs_DEPENDENCIES= $(QFCC_DEPS)
BUILT_SOURCES=qc-parse.c qc-parse.h qc-lex.c qp-parse.c qp-parse.h qp-lex.c
qc-parse.c: qc-parse.y
$(YACC) $(YFLAGS) -Dapi.prefix=qc_yy $< -o $@
qc-lex.c: qc-lex.l
$(LEX) $(LFLAGS) $(AM_LFLAGS) -Pqc_yy -o$@ $<
qp-parse.c: qp-parse.y
$(YACC) $(YFLAGS) -Dapi.prefix=qp_yy $< -o $@
qp-lex.c: qp-lex.l
$(LEX) $(LFLAGS) $(AM_LFLAGS) -Pqp_yy -o$@ $<
EXTRA_DIST=qc-lex.c qc-parse.c qc-parse.h qfpreqcc \
qp-parse.c qp-parse.h qp-lex.c