From cdbe434bf280e1b0b22d800c3383239842d96be2 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Wed, 31 Aug 2016 00:29:26 +0300 Subject: [PATCH] UNIX makefile for imago --- .gitignore | 3 +++ GNUmakefile | 10 +++++++--- libs/imago/GNUmakefile | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 libs/imago/GNUmakefile diff --git a/.gitignore b/.gitignore index 201c530..05be71c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ Release *.suo *sdf demo +*.zip +data +*.a diff --git a/GNUmakefile b/GNUmakefile index 312fd6a..972046b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -2,14 +2,18 @@ src = $(wildcard src/*.c) $(wildcard src/sdl/*.c) obj = $(src:.c=.o) bin = demo -inc = -Isrc -Isrc/sdl +inc = -Isrc -Isrc/sdl -Ilibs/imago/src CFLAGS = -pedantic -Wall -g $(inc) `sdl-config --cflags` -LDFLAGS = `sdl-config --libs` -lm +LDFLAGS = -Llibs/imago -limago `sdl-config --libs` -lm -$(bin): $(obj) +$(bin): $(obj) imago $(CC) -o $@ $(obj) $(LDFLAGS) +.PHONY: imago +imago: + $(MAKE) -C libs/imago + .PHONY: clean clean: rm -f $(obj) $(bin) diff --git a/libs/imago/GNUmakefile b/libs/imago/GNUmakefile new file mode 100644 index 0000000..beba77c --- /dev/null +++ b/libs/imago/GNUmakefile @@ -0,0 +1,15 @@ +src = $(wildcard src/*.c) \ + $(wildcard zlib/*.c) \ + $(wildcard libpng/*.c) \ + $(wildcard jpeglib/*.c) +obj = $(src:.c=.o) +alib = libimago.a + +CFLAGS = -pedantic -Wall -Wno-main -g -Izlib -Ilibpng -Ijpeglib + +$(alib): $(obj) + $(AR) rcs $@ $(obj) + +.PHONY: clean +clean: + rm -f $(obj) $(bin) -- 1.7.10.4