1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-27 20:49:15 +00:00
Files
wfjm.w11/tools/make/generic_so_c.mk
Walter F.J. Mueller d87ac86f53 - migrate to rlink protocol version 4
- Goals for rlink v4
    - 16 bit addresses (instead of 8 bit)
    - more robust encoding, support for error recovery at transport level
    - add features to reduce round trips
      - improved attention handling
      - new 'list abort' command
  - For further details see README_Rlink_V4.txt
- use own C++ based tcl shell tclshcpp instead of tclsh
2014-12-20 16:39:52 +00:00

46 lines
1.3 KiB
Makefile

# $Id: generic_so_c.mk 600 2014-11-02 22:33:02Z mueller $
#
# Revision History:
# Date Rev Version Comment
# 2014-11-02 600 1.0. Initial version (cloned from generic_so.mk)
#---
#
# Build a sharable library and an archive
# --> from C sources only!
# --> with $(CC) rather than $(CXX)
#
# Before including, defined the following variables:
# SOPATH relative directory path of the library (def: $RETROBASE/tools/lib)
# SONAME name of the library
# SOMAJV major version number
# SOMINV minor version number
#
ifndef SOPATH
SOPATH = $(RETROBASE)/tools/lib
endif
#
SOFILE = lib$(SONAME).so
SOFILEV = lib$(SONAME).so.$(SOMAJV)
SOFILEVV = lib$(SONAME).so.$(SOMAJV).$(SOMINV)
AFILE = lib$(SONAME).a
#
.PHONY : libs
libs : $(SOPATH)/$(AFILE) $(SOPATH)/$(SOFILEVV)
#
# Build the sharable library
#
$(SOPATH)/$(SOFILEVV) : $(OBJ_all)
if [ ! -d $(SOPATH) ]; then mkdir -p $(SOPATH); fi
$(CC) -shared -Wl,-soname,$(SOFILEV) -o $(SOPATH)/$(SOFILEVV) \
$(OBJ_all) $(LDLIBS)
(cd $(SOPATH); rm -f $(SOFILE) $(SOFILEV))
(cd $(SOPATH); ln -s $(SOFILEVV) $(SOFILEV))
(cd $(SOPATH); ln -s $(SOFILEV) $(SOFILE))
#
# Build an archive
#
$(SOPATH)/$(AFILE) : $(OBJ_all)
if [ ! -d $(SOPATH) ]; then mkdir -p $(SOPATH); fi
ar -scruv $(SOPATH)/$(AFILE) $?
#