/make/edam-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/edam-mk

« back to all changes in this revision

Viewing changes to edam.mk

  • Committer: edam
  • Date: 2009-03-05 14:28:02 UTC
  • Revision ID: edam@waxworlds.org-20090305142802-um4qc3qwifzlc0ei
Tags: 3.3
- added NOLIBPROFIX switch
- fixed typo in documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
#                       edam's general-purpose makefile
4
4
#_______________________________________________________________________________
5
 
#                                                                    version 3.2
 
5
#                                                                    version 3.3
6
6
#
7
 
# Copyright (c) 2008 Tim Marston <edam@waxworlds.org>.
 
7
# Copyright (c) 2009 Tim Marston <edam@waxworlds.org>.
8
8
#
9
9
# Permission is hereby granted, free of charge, to any person obtaining a copy
10
10
# of this software and associated documentation files (the "Software"), to deal
73
73
# MKSHAREDLIB  Boolean. Target type: Set to build a shared library target. If
74
74
#              neither this nor MKSTATICLIB are set, the target defaults to a
75
75
#              binary executable.
 
76
# NOLIBPREFIX  Boolean. When building a static or shared library, do not ensure
 
77
#              that the target's name is prefixed with "lib".
76
78
#
77
79
# TARGET       The name of the target file.
78
80
#
107
109
# subdirs      Goes through the list of specified subdirectories, changing to
108
110
#              them, and runs make there.
109
111
#
110
 
# subproj      Goes through the list of specified subprojects, running the
 
112
# subprojs     Goes through the list of specified subprojects, running the
111
113
#              makefiles for each of them.
112
114
#
113
115
# target       Builds the target of your Makefile.
186
188
TARGET          := $(patsubst %.so,%,$(patsubst %.a,%,$(TARGET)))
187
189
ifneq ($(strip $(MKSHAREDLIB) $(MKSTATICLIB)),)
188
190
TARGET          := $(TARGET)$(if $(MKSHAREDLIB),.so,$(if $(MKSTATICLIB),.a))
 
191
ifndef NOLIBPREFIX
189
192
TARGET          := lib$(patsubst lib%,%,$(TARGET))
190
193
endif
191
194
endif
 
195
endif
192
196
 
193
197
# Set up dependency generation build flags and, for those languages where the
194
198
# the compiler/assembler doesn't support dependency generation, commands to be