Age | Commit message (Collapse) | Author |
|
Reading the standard thoroughly revealed that the only way to really
get a portable Makefile is to list each target explicitly, so that's
what we'll do now here.
|
|
Thanks Hiltjo for reporting this!
For some reason, OpenBSD make does not add $(BIN).o to the dependency list
when it sees the $(BIN) target rule. It does so however when it does the
conversion from .c to .o.
This behaviour is unique for OpenBSD make as far as I've seen, and for
the time being, this workaround will manually add the object to the
dependency list.
This is not POSIX compliant and in GNU make it just evaluates to an
empty string, but it works until this has been investigated further.
|
|
The tool-specific flags were LDLIBS and not LDFLAGS, because we specify
the libraries we want to link in, not flags to the linker itself.
The order was broken as it didn't allow -Wl,--as-needed or other things
highly dependent on the order of arguments.
I also wanted to add an explicit .c.o suffix rule. This way, it is
clearer what is happening in the Makefile and the form of compilation
output is controllable.
|
|
Of course, you want the libraries to come last in order of execution.
Additionally, in case the libraries provided with $($*-LDFLAGS) contain
unresolved symbols, we want to give the opportunity for the user to
provide the necessary general symbols, whatever they may be, last.
Thanks Duncaen for reporting this!
|
|
|
|
instead of per-tool-settings.
|
|
This is against the standard:
"The application shall ensure that the makefile does not specify
prerequisites for inference rules;"[0]
We are still fine though as we explicitly state the dependency on the
requisite-objects in the $(BIN)-target.
Thanks Lucas for pointing this out!
[0]:http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
|
|
|
|
|
|
|
|
Thanks Hiltjo for the feedback! GNUisms need to be avoided like a
plague, even if it means having to be a little more creative.
Strict POSIX compliance means that I just worked within the bounds of
the POSIX specification, hopefully without using any GNU or BSD
extensions. If I did, please let me know.
Tip to all Linux users: Test your Makefiles with pmake(1) instead of
make(1) (= GNU make) and refer to the newest POSIX 2016 make
specification[0].
[0]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
|
|
|
|
I didn't like the current Makefiles. They were too crufted and not
elegant. Additionally, given I'm planning to put some utility functions
into a util.{c|h}-prerequisite, I wrote this new Makefile with PREREQs
in mind.
|
|
Laslo: Minor changes
Signed-off-by: Mattias Andrée <maandree@kth.se>
|
|
- fix: rebuild on source change.
- allow to override dependency flag per tool (the ones that have deps).
- rebuild on config.mk or headers change.
|
|
This reverts commit 545c500d4278c50e781c9a5a550e92cb0023c8e8.
|
|
I forgot to add the dependencies in the build process
|
|
Even though I like line-length limits, it imposed a useless limitation
on the console output, given the line input is variable.
|
|
- be verbose by default: don't hide the executed commands.
- no need to make clean on make dist, but make sure to have a clean directory.
- define 2ff in ${SCRIPTS}.
- make dist: gzip directly, don't store intermediate step (faster for make dist
on floppies).
- don't cd into directories, just loop each file.
|
|
|
|
- jpg2ff requires libjpeg
- ff2png, png2ff requires libpng (and libz)
- ff2ppm has no dependencies
|
|
ff2ppm can convert farbfeld images to PPM (P6 binary format, 24-bit RGB).
ff2ppm has an option -b to set the background color, for example for png files:
png2ff < test.png | ff2ppm -b '#00ff00' > test.ppm
|
|
Thanks Dimitris for reporting this!
|
|
And add a makerule to create a tarball via make dist.
|
|
|
|
Thanks quinq for reporting this!
|
|
I forgot that we can't just cd. It has to be a &&-statement.
Also, uncomplicate the output.
|
|
While at it, refactor the makefile a bit.
|
|
Thanks z3bra for porting this!
Also change 2ff to use case instead of if-blocks.
|
|
This is a wrapper for the different conversion utilities with
filetype detection using file(1) and an imagemagick fallback.
|
|
|
|
|
|
- Rename the format
- Change the format specification
- Drop old tools waiting to be fixed on a later date, just keep
fixed png for now
- Simplify other stuff
This is a direct consequence of my slcon2-talk on this topic.
At first I planned to have 64 bits per channel, but this is
overkill.
|
|
Thanks to Henrique Lengler <henriqueleng@opmbx.org> for the patch!
|
|
|
|
|
|
|
|
Respectively, image.png will become an image.if
|
|
|