aboutsummaryrefslogtreecommitdiffstats
path: root/7_1/Makefile
blob: 072ca2ea41d0ce8948a4bf54906a1a77c4f77175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CFLAGS += -std=c89

all: test

.PHONY: test clean

test: task7_1
	-./$<
	@./$<		69 429 828 425729 235723572579 000111222333 1048575 1048576 -31273891273891273 \
			-000000000000000000 -2313423 -123 -9223372036854775809 -9223372036854775807 -9223372036854775808 -1048576 -1048575
	./$<		test_file
	@cat 		test_file
	@$(MAKE)	clean



task7_1: main.c
	$(CC) -o $@ $< $(CFLAGS)

clean: 
	$(RM) task7_1
	$(eval TMP := $(shell mktemp))
	@touch $(TMP)
	@head -n 1 test_file > $(TMP)
	@cat $(TMP) > test_file
	@rm -f $(TMP)