Makefile
changeset 66 2b4f786d9073
parent 64 993b97c4ad2d
child 67 abe63a276a36
equal deleted inserted replaced
65:76514757b0d6 66:2b4f786d9073
     1 CC=gcc -g -ggdb
     1      CC = gcc -g -ggdb
     2 CPP=g++ -g -ggdb
     2     CPP = g++ -g -ggdb
     3 CFLAGS=-Wall -O2 -Iinclude -ansi
     3  CFLAGS = -Wall -O2 -Iinclude -ansi
     4 TARGET=ncurses \
     4 
     5 	numerierung \
     5 TARGET  = ncurses
     6 	xdemo \
     6 TARGET += numerierung
     7 	signals \
     7 TARGET += xdemo
     8 	tree \
     8 TARGET += signals
     9 	utf8 \
     9 TARGET += tree
    10 	file_demo \
    10 TARGET += utf8
    11 	testcase \
    11 TARGET += file_demo
    12 	atoi_print \
    12 TARGET += testcase
    13 	data_types \
    13 TARGET += atoi_print
    14 	dnsresolve \
    14 TARGET += data_types
    15 	nomalloc \
    15 TARGET += dnsresolve
    16 	urandom \
    16 TARGET += nomalloc
    17 	threads \
    17 TARGET += urandom
    18 	crypt \
    18 TARGET += threads
    19 	tokenpasting \
    19 TARGET += crypt
    20 	hex2chars \
    20 TARGET += tokenpasting
    21 	floating \
    21 TARGET += hex2chars
    22 	max \
    22 TARGET += floating
    23 	recording \
    23 TARGET += max
    24 	endian \
    24 TARGET += recording
    25 	fak \
    25 TARGET += endian
    26 	blackhole \
    26 TARGET += fak
    27 	folge \
    27 TARGET += blackhole
    28 	counter \
    28 TARGET += folge
    29 	sudoku \
    29 TARGET += counter
    30 	cunit \
    30 TARGET += sudoku
    31 	md5 \
    31 TARGET += cunit
    32 	md5rec \
    32 TARGET += md5
    33 	myprintf \
    33 TARGET += md5rec
    34 	concatenation \
    34 TARGET += myprintf
    35 	alpha_beta \
    35 TARGET += concatenation
    36 	life \
    36 TARGET += alpha_beta
    37 	bad_alloc \
    37 TARGET += life
    38 	lotto \
    38 TARGET += bad_alloc
    39 	database \
    39 TARGET += lotto
    40 	gauss \
    40 TARGET += database
    41 	mem2swap \
    41 TARGET += gauss
    42 	prog_limit \
    42 TARGET += mem2swap
    43 	connection \
    43 TARGET += prog_limit
    44 	copy \
    44 TARGET += connection
    45 	function_pointers \
    45 TARGET += copy
    46 	sort \
    46 TARGET += function_pointers
    47 	min2time \
    47 TARGET += sort
    48 	recursive_compiler \
    48 TARGET += min2time
    49 	getpwnam_error \
    49 TARGET += recursive_compiler
    50 	xmlparser \
    50 TARGET += getpwnam_error
    51 	vector \
    51 TARGET += xmlparser
    52 	base10 \
    52 TARGET += vector
    53 	files \
    53 TARGET += base10
    54 	fork \
    54 TARGET += files
    55 	duff \
    55 TARGET += fork
    56 	unicode
    56 TARGET += duff
       
    57 TARGET += unicode
    57 
    58 
    58 .SUFFIXES: .c .cc .asm
    59 .SUFFIXES: .c .cc .asm
    59 
    60 
    60 .c.o:
    61 .c.o:
    61 	@echo Compiling $< ...
    62 	@echo Compiling $< ...
   285 	@echo Compiling $<...
   286 	@echo Compiling $<...
   286 	@$(CC) -c $(CFLAGS) -std=c99 $<
   287 	@$(CC) -c $(CFLAGS) -std=c99 $<
   287 	@echo Linking $< ...
   288 	@echo Linking $< ...
   288 	@$(CC) -std=c99 -o $@ $<
   289 	@$(CC) -std=c99 -o $@ $<
   289 
   290 
   290 .PHONY: clean uninstall
   291 .PHONY: beauty clean uninstall
   291 
   292 
   292 clean:
   293 clean:
   293 	find -name '*~' -exec rm -f {} \;
   294 	find -name '*~' -exec rm -f {} \;
   294 	find -name '*.[oa]' -exec rm -f {} \;
   295 	find -name '*.[oa]' -exec rm -f {} \;
   295 	rm -f $(TARGET)
   296 	rm -f $(TARGET)
   296 
   297 
   297 beauty:
   298 beauty:
   298 	find -name '*.[ch]' -exec indent {} \;
   299 	find -name '*.[ch]' -exec indent {} \;
   299 	find -name '*.[ch]' -exec eraser {} \;
   300 	find -name '*.[ch]' -exec eraser {} \;
       
   301 	find -name 'Makefile*' -exec eraser {} \;
   300 	@make clean
   302 	@make clean