159 lines
3.1 KiB
Makefile
159 lines
3.1 KiB
Makefile
#
|
|
# 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@)
|
|
CPPFLAGS = @CPPFLAGS@ -I. -I$(PRJDIR) \
|
|
-I$(PRJDIR)/sim.src -I$(PRJDIR)/cmd.src
|
|
CFLAGS = @CFLAGS@ -Wall
|
|
CXXFLAGS = @CXXFLAGS@ -Wall
|
|
M_OR_MM = @M_OR_MM@
|
|
|
|
LIBS = @LIBS@ @CURSES_LIBS@ -L$(PRJDIR)
|
|
|
|
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@
|
|
|
|
PKGS =
|
|
CURSES_PKGS = serio.src
|
|
|
|
# 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)
|
|
|
|
|
|
# Compiling entire program or any subproject
|
|
# ------------------------------------------
|
|
all: gui.src
|
|
|
|
gui.src: checkconf gui_api
|
|
ifeq ($(curses_ok),yes)
|
|
@for pkg in $(CURSES_PKGS); do\
|
|
$(MAKE) -C $$pkg $$pkg ;\
|
|
done
|
|
endif
|
|
# @for pkg in $(PKGS); do\
|
|
# $(MAKE) -C $$pkg $$pkg ;\
|
|
# done
|
|
|
|
gui_api: ucsim_lib tool_lib
|
|
|
|
|
|
# Compiling and installing everything and runing test
|
|
# ---------------------------------------------------
|
|
install: install_gui_api
|
|
@for pkg in $(PKGS); do\
|
|
cd $$pkg && $(MAKE) install ; cd ..;\
|
|
done
|
|
|
|
install_gui_api:
|
|
|
|
|
|
# Deleting all the installed files
|
|
# --------------------------------
|
|
uninstall: uninstall_gui_api
|
|
@for pkg in $(PKGS); do\
|
|
cd $$pkg && $(MAKE) uninstall ; cd ..;\
|
|
done
|
|
|
|
uninstall_gui_api:
|
|
|
|
|
|
# Performing self-test
|
|
# --------------------
|
|
check: check_gui_api
|
|
@for pkg in $(PKGS); do\
|
|
cd $$pkg && $(MAKE) check ; cd ..;\
|
|
done
|
|
|
|
check_gui_api:
|
|
|
|
|
|
# Performing installation test
|
|
# ----------------------------
|
|
installcheck: installcheck_gui_api
|
|
@for pkg in $(PKGS); do\
|
|
cd $$pkg && $(MAKE) installcheck ; cd ..;\
|
|
done
|
|
|
|
installcheck_gui_api:
|
|
|
|
|
|
# Creating installation directories
|
|
# ---------------------------------
|
|
installdirs:
|
|
@for pkg in $(PKGS); do\
|
|
cd $$pkg && $(MAKE) installdirs ; cd ..;\
|
|
done
|
|
|
|
|
|
# Creating dependencies
|
|
# ---------------------
|
|
dep: Makefile.dep
|
|
|
|
Makefile.dep: $(ALL_SOURCES) *.h
|
|
$(CXXCPP) -MM $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >Makefile.dep
|
|
|
|
include Makefile.dep
|
|
include clean.mk
|
|
|
|
|
|
# My rules
|
|
# --------
|
|
ucsim_lib: $(PRJDIR)/libguiucsim.a
|
|
|
|
$(PRJDIR)/libguiucsim.a: $(OBJECTS) $(UCSIM_OBJECTS)
|
|
$(AR) -rcu $*.a $(OBJECTS) $(UCSIM_OBJECTS)
|
|
$(RANLIB) $*.a
|
|
|
|
tool_lib: $(PRJDIR)/libguitool.a
|
|
|
|
$(PRJDIR)/libguitool.a: $(OBJECTS) $(TOOL_OBJECTS)
|
|
$(AR) -rcu $*.a $(OBJECTS) $(TOOL_OBJECTS)
|
|
$(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
|