Add example with libraries

This commit is contained in:
Christophe de Dinechin 2017-07-01 12:48:08 +02:00
parent ecc48f708b
commit 5e4fb03b91
5 changed files with 64 additions and 0 deletions

View File

@ -25,6 +25,9 @@ BUILD=./
# Define the source code
SOURCES=hello.cpp
# Define libraries we use in that project
LIBRARIES=lib1 lib2
# Define the product of the build (.exe will be removed for Unix builds)
PRODUCTS=hello.exe

26
lib1/Makefile Normal file
View File

@ -0,0 +1,26 @@
#******************************************************************************
# Makefile<lib1> XL - An extensible language
#******************************************************************************
#
# File Description:
#
#
#
#
#
#
#
#
#
#
#******************************************************************************
# (C) 2017 Christophe de Dinechin <christophe@dinechin.org>
# This software is licensed under the GNU General Public License v3
# See LICENSE file for details.
#******************************************************************************
BUILD=../
SOURCES=lib1.c
PRODUCTS=lib1.lib
include $(BUILD)rules.mk

4
lib1/lib1.c Normal file
View File

@ -0,0 +1,4 @@
int lib1_foo()
{
return 0;
}

27
lib2/Makefile Normal file
View File

@ -0,0 +1,27 @@
#******************************************************************************
# Makefile<lib2> XL - An extensible language
#******************************************************************************
#
# File Description:
#
#
#
#
#
#
#
#
#
#
#******************************************************************************
# (C) 2017 Christophe de Dinechin <christophe@dinechin.org>
# This software is licensed under the GNU General Public License v3
# See LICENSE file for details.
#******************************************************************************
BUILD=../
SOURCES=lib2.c
PRODUCTS=lib2.lib
include $(BUILD)rules.mk

4
lib2/lib2.c Normal file
View File

@ -0,0 +1,4 @@
int lib2_bar()
{
return 0;
}