#
# Automatically generated by generate-makefiles.sh -- DO NOT EDIT.
#
# Restrictions for generate-makefiles.sh apply to this file. See COPYING for
# more details.
#
# Ngie Cooper, June 2010
#

# Path variables.
top_srcdir?=		../../..
subdir=			conformance/interfaces/sigaddset
srcdir=			$(top_srcdir)/$(subdir)

prefix?=		/opt/ltp
exec_prefix?=		$(prefix)
INSTALL_DIR=		$(DESTDIR)/$(exec_prefix)/$(subdir)
LOGFILE?=		logfile

# Build variables
CFLAGS+=		-I$(top_srcdir)/include

# XXX: for testfrmw.c -- needs to be moved into a library.
CFLAGS+=		-I$(srcdir)

# Top-level make definitions
CFLAGS+=		-std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -W -Wall
LDFLAGS+=		
LDLIBS+=		
# Parameters from the top level configure
CC=		arm-poky-linux-gnueabi-gcc  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed                                                                     -Wl,-z,relro,-z,now -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security 
CFLAGS+=	 -O2 -pipe -g -feliminate-unused-debug-types                                                                    
LDLIBS+=	
LDFLAGS+=	-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed                                                                     -Wl,-z,relro,-z,now
# Submake make definitions.
CFLAGS+=		
LDFLAGS+=		
LDLIBS+=		

INSTALL_TARGETS+=	sigaddset_1-1.run-test sigaddset_1-2.run-test sigaddset_1-3.run-test sigaddset_2-1.run-test sigaddset_4-1.run-test
MAKE_TARGETS+=		sigaddset_1-1.run-test sigaddset_1-2.run-test sigaddset_1-3.run-test sigaddset_2-1.run-test sigaddset_4-1.run-test

ifeq ($V,1)
VERBOSE=1
endif

ifndef VERBOSE
v=@
endif

all: $(MAKE_TARGETS)
	@if [ -d speculative ]; then $(MAKE) -C speculative all; fi

clean:
	rm -f $(MAKE_TARGETS) logfile* run.sh *.core
	@if [ -d speculative ]; then $(MAKE) -C speculative clean; fi

install: $(INSTALL_DIR) run.sh
	set -e; for file in $(INSTALL_TARGETS) run.sh; do	\
		if [ -f "$$file" ] ; then			\
			install -m 00755 $$file		\
				$(INSTALL_DIR)/$$file;	\
		fi;						\
	done
	@if [ -d speculative ]; then $(MAKE) -C speculative install; fi

test: run.sh
	$(v)./run.sh

$(INSTALL_DIR):
	mkdir -p $@

run.sh:
	@echo '#!/bin/sh' > $@
	@echo "$(top_srcdir)/bin/run-tests.sh $(subdir) $(INSTALL_TARGETS)" >> $@
	@chmod +x run.sh

sigaddset_1-1.run-test: $(srcdir)/1-1.c
	$(v)if $(CC)  $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/1-1.c $(LDLIBS) > logfile.$$$$ 2>&1; then \
		 cat logfile.$$$$; \
		 echo "$(subdir)/1-1 compile PASSED"; \
		 echo "$(subdir)/1-1 compile PASSED" >> $(LOGFILE); \
	else \
		 cat logfile.$$$$; \
		 echo "$(subdir)/1-1 compile FAILED; SKIPPING"; \
		(echo "$(subdir)/1-1 compile FAILED; SKIPPING"; cat logfile.$$$$) >> $(LOGFILE); \
	fi; \
	rm -f logfile.$$$$

sigaddset_1-2.run-test: $(srcdir)/1-2.c
	$(v)if $(CC)  $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/1-2.c $(LDLIBS) > logfile.$$$$ 2>&1; then \
		 cat logfile.$$$$; \
		 echo "$(subdir)/1-2 compile PASSED"; \
		 echo "$(subdir)/1-2 compile PASSED" >> $(LOGFILE); \
	else \
		 cat logfile.$$$$; \
		 echo "$(subdir)/1-2 compile FAILED; SKIPPING"; \
		(echo "$(subdir)/1-2 compile FAILED; SKIPPING"; cat logfile.$$$$) >> $(LOGFILE); \
	fi; \
	rm -f logfile.$$$$

sigaddset_1-3.run-test: $(srcdir)/1-3.c
	$(v)if $(CC)  $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/1-3.c $(LDLIBS) > logfile.$$$$ 2>&1; then \
		 cat logfile.$$$$; \
		 echo "$(subdir)/1-3 compile PASSED"; \
		 echo "$(subdir)/1-3 compile PASSED" >> $(LOGFILE); \
	else \
		 cat logfile.$$$$; \
		 echo "$(subdir)/1-3 compile FAILED; SKIPPING"; \
		(echo "$(subdir)/1-3 compile FAILED; SKIPPING"; cat logfile.$$$$) >> $(LOGFILE); \
	fi; \
	rm -f logfile.$$$$

sigaddset_2-1.run-test: $(srcdir)/2-1.c
	$(v)if $(CC)  $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/2-1.c $(LDLIBS) > logfile.$$$$ 2>&1; then \
		 cat logfile.$$$$; \
		 echo "$(subdir)/2-1 compile PASSED"; \
		 echo "$(subdir)/2-1 compile PASSED" >> $(LOGFILE); \
	else \
		 cat logfile.$$$$; \
		 echo "$(subdir)/2-1 compile FAILED; SKIPPING"; \
		(echo "$(subdir)/2-1 compile FAILED; SKIPPING"; cat logfile.$$$$) >> $(LOGFILE); \
	fi; \
	rm -f logfile.$$$$

sigaddset_4-1.run-test: $(srcdir)/4-1.c
	$(v)if $(CC)  $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/4-1.c $(LDLIBS) > logfile.$$$$ 2>&1; then \
		 cat logfile.$$$$; \
		 echo "$(subdir)/4-1 compile PASSED"; \
		 echo "$(subdir)/4-1 compile PASSED" >> $(LOGFILE); \
	else \
		 cat logfile.$$$$; \
		 echo "$(subdir)/4-1 compile FAILED; SKIPPING"; \
		(echo "$(subdir)/4-1 compile FAILED; SKIPPING"; cat logfile.$$$$) >> $(LOGFILE); \
	fi; \
	rm -f logfile.$$$$

