Česky
Kamil Dudka

Tiny programs (C, C++, C#, ...)

File detail

Name:DownloadMakefile [Download]
Location: tiny > IJC > du2
Size:720 B
Last modification:2007-08-29 17:44

Source code

# Makefile
# Kamil Dudka, FIT, DU2, priklad 2, 17.4.2005
 
CFLAGS=-std=c99 -pedantic -Wall $(ARG_EXTRA)
CPPFLAGS=-std=c++98 -pedantic -Wall $(ARG_EXTRA)
 
RM=rm -f
 
BINARY=wordcount tail tail2
WC_OBJ=wordcount.o htable.o
TARBALL=Makefile tail.c tail2.cc wordcount.c htable.c htable.h
 
all: $(BINARY)
 
wordcount: $(WC_OBJ)
	gcc -o $@ $(WC_OBJ)
 
wordcount.o: wordcount.c htable.h
	gcc $(CFLAGS) -c wordcount.c
 
htable.o: htable.c htable.h
	gcc $(CFLAGS) -c htable.c
 
htable.s: htable.c htable.h
	gcc $(CFLAGS) -c htable.c
 
tail: tail.c
	gcc $(CFLAGS) -o $@ $<
 
tail2: tail2.cc
	g++ $(CPPFLAGS) -o $@ $<
 
clean:
	$(RM) $(WC_OBJ)
	$(RM) $(BINARY)
 
ijc-du2.tar.gz: $(TARBALL)
	tar c $(TARBALL) | gzip > $@
 
tgz: ijc-du2.tar.gz