-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (36 loc) · 857 Bytes
/
Makefile
File metadata and controls
50 lines (36 loc) · 857 Bytes
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
43
44
45
46
47
48
49
50
.IGNORE:
SHELL = /bin/bash
prefix = /usr/local
bindir = $(prefix)/bin
LIBS =
LDFLAGS = -L. -L/usr/local/lib
CC = /usr/bin/gcc
CFLAGS = -ansi -c
CPPFLAGS = -I. -I/usr/local/include
CC_COMP = $(CC) $(CFLAGS) $(CPPFLAGS)
CC_LOAD = $(CC) $(LDFLAGS)
EXECUTABLES = Main
all: $(EXECUTABLES)
install: all
if test ! -d $(prefix); then\
mkdir $(prefix);\
fi
if test ! -d $(bindir); then\
mkdir $(bindir);\
fi
cp $(EXECUTABLES) $(bindir)
.c.o:
$(CC_COMP) $*.c
OBJECTS = Main.o
Main: $(OBJECTS)
$(CC_LOAD) $(OBJECTS) $(LIBS) -o Main
softCopy:
./$(EXECUTABLES) < input.txt > Test\ Output.txt
########################################################################
# Clean-up
########################################################################
clean:
/bin/rm $(EXECUTABLES)
/bin/rm *.o
cleanObject:
/bin/rm *.o