GNUmakefile - clic - Clic is an command line interactive client for gopher written in Common LISP
 (HTM) git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
       GNUmakefile (2771B)
       ---
            1 # -*- Mode: Makefile; tab-width: 3; indent-tabs-mode: t -*-
            2 #
            3 # Makefile --- Make targets for various tasks.
            4 #
            5 # Copyright (C) 2005, James Bielman  <jamesjb@jamesjb.com>
            6 #
            7 # Permission is hereby granted, free of charge, to any person
            8 # obtaining a copy of this software and associated documentation
            9 # files (the "Software"), to deal in the Software without
           10 # restriction, including without limitation the rights to use, copy,
           11 # modify, merge, publish, distribute, sublicense, and/or sell copies
           12 # of the Software, and to permit persons to whom the Software is
           13 # furnished to do so, subject to the following conditions:
           14 #
           15 # The above copyright notice and this permission notice shall be
           16 # included in all copies or substantial portions of the Software.
           17 #
           18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
           19 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
           20 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
           21 # NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
           22 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
           23 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
           24 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
           25 # DEALINGS IN THE SOFTWARE.
           26 #
           27 
           28 OSTYPE = $(shell uname)
           29 ARCH   = $(shell uname -m)
           30 
           31 CC             := gcc
           32 CFLAGS         := -Wall -std=c99 -pedantic
           33 SHLIB_CFLAGS   := -shared
           34 SHLIB_EXT      := .so
           35 
           36 ifneq ($(if $(filter Linux %BSD,$(OSTYPE)),OK), OK)
           37 ifeq ($(OSTYPE), Darwin)
           38 SHLIB_CFLAGS   := -dynamiclib
           39 SHLIB_EXT      := .dylib
           40 ifeq ($(shell sysctl -n hw.optional.x86_64), 1)
           41 ARCH           := x86_64
           42 CFLAGS_64      := -m64
           43 endif
           44 else
           45 ifeq ($(OSTYPE), SunOS)
           46 CFLAGS         := -m64 -fPIC -c -Wall -std=c99 -pedantic
           47 else
           48 # Let's assume this is win32
           49 SHLIB_EXT      := .dll
           50 endif
           51 endif
           52 endif
           53 
           54 ifneq ($(ARCH), x86_64)
           55 CFLAGS += -lm
           56 endif
           57 
           58 ifeq ($(ARCH), x86_64)
           59 CFLAGS_64 += -fPIC
           60 endif
           61 
           62 # Are all G5s ppc970s?
           63 ifeq ($(ARCH), ppc970)
           64 CFLAGS_64 += -m64
           65 endif
           66 
           67 SHLIBS = libtest$(SHLIB_EXT) libtest2$(SHLIB_EXT) libfsbv$(SHLIB_EXT)
           68 
           69 ifeq ($(ARCH), x86_64)
           70 SHLIBS += libtest32$(SHLIB_EXT) libtest2_32$(SHLIB_EXT) libfsbv_32$(SHLIB_EXT)
           71 endif
           72 
           73 shlibs: $(SHLIBS)
           74 
           75 libtest$(SHLIB_EXT): libtest.c
           76         $(CC) -o $@ $(SHLIB_CFLAGS) $(CFLAGS) $(CFLAGS_64) $<
           77 
           78 libtest2$(SHLIB_EXT): libtest2.c
           79         $(CC) -o $@ $(SHLIB_CFLAGS) $(CFLAGS) $(CFLAGS_64) $<
           80 
           81 libfsbv$(SHLIB_EXT): libfsbv.c
           82         $(CC) -o $@ $(SHLIB_CFLAGS) $(CFLAGS) $(CFLAGS_64) $<
           83 
           84 ifeq ($(ARCH), x86_64)
           85 libtest32$(SHLIB_EXT): libtest.c
           86         -$(CC) -m32 -o $@ $(SHLIB_CFLAGS) $(CFLAGS) $<
           87 
           88 libtest2_32$(SHLIB_EXT): libtest2.c
           89         -$(CC) -m32 -o $@ $(SHLIB_CFLAGS) $(CFLAGS) $<
           90 
           91 libfsbv_32$(SHLIB_EXT): libfsbv.c
           92         -$(CC) -m32 -o $@ $(SHLIB_CFLAGS) $(CFLAGS) $<
           93 endif
           94 
           95 clean:
           96         rm -f *.so *.dylib *.dll *.bundle
           97 
           98 # vim: ft=make ts=3 noet