gbdk/sdcc/sim/ucsim/sim.src/Makefile.in
2015-01-10 16:25:09 +01:00

123 lines
2.3 KiB
Makefile

#
# S51 sim.src/Makefile
#
# (c) Drotos Daniel, Talker Bt. 1997,99
#
STARTYEAR = 1997
SHELL = /bin/sh
CXX = @CXX@
CPP = @CPP@
CXXCPP = @CXXCPP@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
PRJDIR = ..
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
-I$(PRJDIR)/cmd.src -I$(PRJDIR)/gui.src
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
includedir = @includedir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
OBJECTS = app.o sim.o itsrc.o brk.o option.o arg.o stack.o \
guiobj.o uc.o hw.o mem.o
# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf sim_lib
test_mem_speed: $(PRJDIR)/libsim.a $(PRJDIR)/libutil.a test_mem_speed.o
$(CC) -o $@ test_mem_speed.o -L$(PRJDIR) -lsim -lutil
sim.src: all
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
# Deleting all the installed files
# --------------------------------
uninstall:
# Performing self-test
# --------------------
check:
# Performing installation test
# ----------------------------
installcheck:
# Creating installation directories
# ---------------------------------
installdirs:
test: test_mem_speed
# Creating dependencies
# ---------------------
dep: main.dep
Makefile.dep: *.cc *.h
$(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >Makefile.dep
include Makefile.dep
include clean.mk
#parser.cc: parser.y
#plex.cc: plex.l
# My rules
# --------
sim_lib: $(PRJDIR)/libsim.a
$(PRJDIR)/libsim.a: $(OBJECTS)
$(AR) -rcu $*.a $(OBJECTS)
$(RANLIB) $*.a
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
.y.cc:
rm -f $*.cc $*.h
$(YACC) -d $<
mv y.tab.c $*.cc
mv y.tab.h $*.h
.l.cc:
rm -f $*.cc
$(LEX) -t $< >$*.cc
# Remaking configuration
# ----------------------
checkconf:
@if [ -f $(PRJDIR)/devel ]; then\
$(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
fi
# End of sim.src/Makefile