view Makefile @ 382:28d66757a87a

Move the debug/test defines to main Makefile.gen
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 03 Mar 2016 11:45:23 +0200
parents 3f05f6fb5dfd
children 6e6c8c4fc210
line wrap: on
line source

#
# Configuration settings for Linux and generic UNIX
# See other Makefile.* files for more options.
#

# C-compiler, flags and linker flags
CC ?= gcc
AR ?= ar
RANLIB ?= ranlib
INSTALL ?= install

CFLAGS += -DHAVE_STRING_H -DHAVE_STDINT_H -DHAVE_CONFIG_H=1
LDFLAGS +=

#CFLAGS += -DHAVE_STDINT_H
#CFLAGS += -DHAVE_SYS_TYPES_H

# Miscellaneous
BINPATH=./
OBJPATH=obj/unix/
EXEEXT=


###
### Stuff
###
ENDIANCHK_BIN = $(BINPATH)endianchk$(EXEEXT)
NOINST_TARGETS += $(ENDIANCHK_BIN) config.h
THLIBS_DEP += config.h

include Makefile.gen


$(ENDIANCHK_BIN): endianchk.c
	$(CC) $(CFLAGS) -o $@ $+

config.h: $(ENDIANCHK_BIN)
	$(ENDIANCHK_BIN) > $@