File: Makefile

package info (click to toggle)
metrics 1.0-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 452 kB
  • ctags: 342
  • sloc: ansic: 2,101; lex: 747; makefile: 250; yacc: 233; sh: 209
file content (42 lines) | stat: -rw-r--r-- 619 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# simple makefile for a single c program
#

bindir = $(PREFIX)/usr/bin

# name of program
PROGRAM = ccount

# all source files (.c)
SOURCES = ccount.c

# all header files (.h)
HEADERS =

CC = gcc
CFLAGS = -g  -O2

# any additional libraries to be linked against
#LDLIBS = -lm
LDLIBS = 


# ____________________ no edits necessary below this line _____________________

all: $(PROGRAM)

OBJECTS=$(SOURCES:.c=.o)

$(PROGRAM): $(OBJECTS)
	$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LDLIBS)

install:
	install -s $(PROGRAM) $(bindir)

clean:
	rm -f $(OBJECTS) $(PROGRAM)

clobber: clean
	rm -f $(PROGRAM)

$(OBJECTS): $(HEADERS)