view Makefile @ 2349:463e5d9771ee

More build system work: change DMCONFIG Make variable to DM_CONFIG, and add option of setting it to value "no" which disables inclusion of "config.mak". Setting DM_CONFIG to any other non-empty value will include file with that name instead. Empty value will include default "config.mak".
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 29 Oct 2019 14:46:01 +0200
parents 85f76ec15090
children 69a5af2eb1ea
line wrap: on
line source

#
# Generic UNIX targets
#
DM_CFLAGS += -DDM_HAVE_MEMSET=1

DMLIB ?= ./
BINPATH ?= ./
OBJPATH ?= ./obj/unix/
PREFIX ?= /usr/local
INSTALL ?= install
RANLIB ?= ranlib

SDL_CFLAGS ?= $(shell pkg-config --cflags sdl2)
SDL_LDFLAGS ?= $(shell pkg-config --libs sdl2)

SDL_TTF_CFLAGS ?= $(shell pkg-config --cflags SDL2_ttf)
SDL_TTF_LDFLAGS ?= $(shell pkg-config --libs SDL2_ttf)

TREMOR_CFLAGS ?= $(shell pkg-config --cflags ogg)
TREMOR_LDFLAGS ?= /usr/lib/libvorbisidec.a $(shell pkg-config --variable=libdir ogg)/libogg.a

LIBPNG_CFLAGS ?= $(shell pkg-config --cflags libpng)
LIBPNG_LDFLAGS ?= $(shell pkg-config --libs libpng)

ZLIB_CFLAGS ?= $(shell pkg-config --cflags zlib)
ZLIB_LDFLAGS ?= $(shell pkg-config --libs zlib)


TOOL_LDFLAGS ?=

include $(DMLIB)Makefile.gen


install: all
	@for fn in $(TOOL_TARGETS); do echo " INSTALL $$fn $(DESTDIR)$(PREFIX)/bin/"; $(INSTALL) -m 755 "$$fn" $(DESTDIR)$(PREFIX)/bin/; done