gbdk-releases/sdcc/sim/ucsim/gui.src/Makefile.in

159 lines
3.1 KiB
Makefile
Raw Permalink Normal View History

2015-01-10 16:25:06 +01:00
#
# uCsim gui.src/Makefile
#
# (c) Drotos Daniel, Talker Bt. 1999
#
SHELL = /bin/sh
CXX = @CXX@
CPP = @CPP@
CXXCPP = @CXXCPP@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
PRJDIR = ..
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
2015-01-10 16:25:09 +01:00
CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
-I$(PRJDIR)/sim.src -I$(PRJDIR)/cmd.src
2015-01-10 16:25:06 +01:00
CFLAGS = @CFLAGS@ -Wall
CXXFLAGS = @CXXFLAGS@ -Wall
M_OR_MM = @M_OR_MM@
2015-01-10 16:25:07 +01:00
LIBS = @LIBS@ @CURSES_LIBS@ -L$(PRJDIR)
2015-01-10 16:25:06 +01:00
curses_ok = @curses_ok@
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@
2015-01-10 16:25:09 +01:00
PKGS =
CURSES_PKGS = serio.src
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:09 +01:00
# Common code
OBJECTS = rec.o
SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
# uCsim only
UCSIM_OBJECTS = gui.o if.o
UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
# Tool only
TOOL_OBJECTS =
TOOL_SOURCES = $(patsubst %.o,%.cc,$(TOOL_OBJECTS))
ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES) $(TOOL_SOURCES)
2015-01-10 16:25:06 +01:00
# Compiling entire program or any subproject
# ------------------------------------------
all: gui.src
2015-01-10 16:25:09 +01:00
gui.src: checkconf gui_api
2015-01-10 16:25:06 +01:00
ifeq ($(curses_ok),yes)
2015-01-10 16:25:09 +01:00
@for pkg in $(CURSES_PKGS); do\
2015-01-10 16:25:06 +01:00
$(MAKE) -C $$pkg $$pkg ;\
done
2015-01-10 16:25:09 +01:00
endif
# @for pkg in $(PKGS); do\
# $(MAKE) -C $$pkg $$pkg ;\
# done
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:09 +01:00
gui_api: ucsim_lib tool_lib
2015-01-10 16:25:06 +01:00
# Compiling and installing everything and runing test
# ---------------------------------------------------
2015-01-10 16:25:09 +01:00
install: install_gui_api
2015-01-10 16:25:06 +01:00
@for pkg in $(PKGS); do\
cd $$pkg && $(MAKE) install ; cd ..;\
done
2015-01-10 16:25:09 +01:00
install_gui_api:
2015-01-10 16:25:06 +01:00
# Deleting all the installed files
# --------------------------------
2015-01-10 16:25:09 +01:00
uninstall: uninstall_gui_api
2015-01-10 16:25:06 +01:00
@for pkg in $(PKGS); do\
cd $$pkg && $(MAKE) uninstall ; cd ..;\
done
2015-01-10 16:25:09 +01:00
uninstall_gui_api:
2015-01-10 16:25:06 +01:00
# Performing self-test
# --------------------
2015-01-10 16:25:09 +01:00
check: check_gui_api
2015-01-10 16:25:06 +01:00
@for pkg in $(PKGS); do\
cd $$pkg && $(MAKE) check ; cd ..;\
done
2015-01-10 16:25:09 +01:00
check_gui_api:
2015-01-10 16:25:06 +01:00
# Performing installation test
# ----------------------------
2015-01-10 16:25:09 +01:00
installcheck: installcheck_gui_api
2015-01-10 16:25:06 +01:00
@for pkg in $(PKGS); do\
cd $$pkg && $(MAKE) installcheck ; cd ..;\
done
2015-01-10 16:25:09 +01:00
installcheck_gui_api:
2015-01-10 16:25:06 +01:00
# Creating installation directories
# ---------------------------------
installdirs:
@for pkg in $(PKGS); do\
cd $$pkg && $(MAKE) installdirs ; cd ..;\
done
# Creating dependencies
# ---------------------
dep: Makefile.dep
2015-01-10 16:25:09 +01:00
Makefile.dep: $(ALL_SOURCES) *.h
$(CXXCPP) -MM $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >Makefile.dep
2015-01-10 16:25:06 +01:00
include Makefile.dep
include clean.mk
# My rules
# --------
2015-01-10 16:25:09 +01:00
ucsim_lib: $(PRJDIR)/libguiucsim.a
$(PRJDIR)/libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
$(AR) -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS)
$(RANLIB) $*.a
tool_lib: $(PRJDIR)/libguitool.a
2015-01-10 16:25:06 +01:00
2015-01-10 16:25:09 +01:00
$(PRJDIR)/libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
$(AR) -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS)
2015-01-10 16:25:06 +01:00
$(RANLIB) $*.a
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
# Remaking configuration
# ----------------------
checkconf:
@if [ -f $(PRJDIR)/devel ]; then\
$(MAKE) -f conf.mk srcdir="$(srcdir)" PRJDIR="$(PRJDIR)" freshconf;\
fi
# End of gui.src/Makefile