From 1d44db7e087b37a0dce578adfe2b38613b5e48b3 Mon Sep 17 00:00:00 2001 From: "Tom G. Huang" Date: Fri, 18 Aug 2017 16:44:09 -0700 Subject: [PATCH] chord(proj): Add makefiles in root folder for Travis CI --- .travis.yml | 2 ++ Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ Makefile.nmake | 22 ++++------------------ 3 files changed, 48 insertions(+), 18 deletions(-) create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml index c3eb6a1..0a526de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,4 @@ language: c +script: make + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..41809da --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +################################################################################ +# This file is part of the argtable3 library. +# +# Copyright (C) 2013-2014 Tom G. Huang +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of STEWART HEITMANN nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL STEWART HEITMANN BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +################################################################################ + +.PHONY: all build_examples build_tests cleanall +all: build_examples build_tests + +build_examples: + $(MAKE) -C examples + +build_tests: + $(MAKE) -C tests + +cleanall: + $(MAKE) -C examples cleanall + $(MAKE) -C tests cleanall diff --git a/Makefile.nmake b/Makefile.nmake index 4810f18..756dd38 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -28,19 +28,8 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ################################################################################ -CFLAGS= /Ox /W3 /wd4996 /nologo - -LIBFLAGS=/nologo +all: build_examples build_tests -ALL_OBJS = argtable3.obj - -OUT_FILE = argtable3.lib - -all: static_lib build_examples build_tests - -static_lib: $(ALL_OBJS) - lib $(LIBFLAGS) $(ALL_OBJS) /out:$(OUT_FILE) - build_examples: cd $(MAKEDIR)/examples $(MAKE) /F Makefile.nmake @@ -50,10 +39,7 @@ build_tests: $(MAKE) /F Makefile.nmake cleanall: - del $(ALL_OBJS) - del $(OUT_FILE) - cd examples + cd $(MAKEDIR)/examples + $(MAKE) /F Makefile.nmake cleanall + cd $(MAKEDIR)/tests $(MAKE) /F Makefile.nmake cleanall - cd .. - cd tests - $(MAKE) /F Makefile.nmake cleanall \ No newline at end of file