/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:26:08 UTC
  • Revision ID: edam@waxworlds.org-20090305142608-63gav9dxralm0mm8
Tags: 3.2
- added subprojects via SUBPROJS variable
- tweaked some comments

Show diffs side-by-side

added added

removed removed

2
2
#
3
3
#                       edam's general-purpose makefile
4
4
#_______________________________________________________________________________
5
 
#                                                                    version 3.3
 
5
#                                                                    version 3.2
6
6
#
7
 
# Copyright (c) 2009 Tim Marston <edam@waxworlds.org>.
 
7
# Copyright (c) 2008 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".
78
76
#
79
77
# TARGET       The name of the target file.
80
78
#
109
107
# subdirs      Goes through the list of specified subdirectories, changing to
110
108
#              them, and runs make there.
111
109
#
112
 
# subprojs     Goes through the list of specified subprojects, running the
 
110
# subproj      Goes through the list of specified subprojects, running the
113
111
#              makefiles for each of them.
114
112
#
115
113
# target       Builds the target of your Makefile.
188
186
TARGET          := $(patsubst %.so,%,$(patsubst %.a,%,$(TARGET)))
189
187
ifneq ($(strip $(MKSHAREDLIB) $(MKSTATICLIB)),)
190
188
TARGET          := $(TARGET)$(if $(MKSHAREDLIB),.so,$(if $(MKSTATICLIB),.a))
191
 
ifndef NOLIBPREFIX
192
189
TARGET          := lib$(patsubst lib%,%,$(TARGET))
193
190
endif
194
191
endif
195
 
endif
196
192
 
197
193
# Set up dependency generation build flags and, for those languages where the
198
194
# the compiler/assembler doesn't support dependency generation, commands to be