view Makefile @ 54:c4b4acee5efa

Add config.h to targets.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 26 Dec 2015 13:18:58 +0200
parents be3ccb7ca790
children 8dda5f225083
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

CFLAGS=-DHAVE_STRING_H -DHAVE_STDINT_H -DHAVE_CONFIG_H=1 -I.

LDFLAGS=

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

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


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

include Makefile.gen


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

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