Home / guide / beyond_cs302 / makefile
Directory Listing
calloc.c
hello_world.c
makefile
malloc_free.c
new_delete.cpp
realloc.c
string_ex1.c
string_ex2.c
struct_ex1.c
struct_ex1.cpp
struct_ex2.c
struct_func_ex.c
struct_func_ex.cpp
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
51
# C++ Compiler Configuration
CPPC     = g++
CPPFLAGS = --std=c++98

# C Compiler Configuration
CC       = gcc
CFLAGS   = --std=gnu89

all: calloc hello_world malloc_free new_delete realloc string_ex1 string_ex2 \
	struct_ex1_c struct_ex1_cpp struct_ex2 struct_func_ex_c struct_func_ex_cpp

calloc: calloc.c
	$(CC) $(CFLAGS) -o $@ $^

hello_world: hello_world.c
	$(CC) $(CFLAGS) -o $@ $^

malloc_free: malloc_free.c
	$(CC) $(CFLAGS) -o $@ $^

new_delete: new_delete.cpp
	$(CPPC) $(CPPFLAGS) -o $@ $^

realloc: realloc.c
	$(CC) $(CFLAGS) -o $@ $^

string_ex1: string_ex1.c
	$(CC) $(CFLAGS) -o $@ $^

string_ex2: string_ex2.c
	$(CC) $(CFLAGS) -o $@ $^

struct_ex1_c: struct_ex1.c
	$(CC) $(CFLAGS) -o $@ $^

struct_ex1_cpp: struct_ex1.cpp
	$(CPPC) $(CPPFLAGS) -o $@ $^

struct_ex2: struct_ex2.c
	$(CC) $(CFLAGS) -o $@ $^

struct_func_ex_c: struct_func_ex.c
	$(CC) $(CFLAGS) -o $@ $^

struct_func_ex_cpp: struct_func_ex.cpp
	$(CPPC) $(CPPFLAGS) -o $@ $^

clean:
	$(RM) calloc hello_world malloc_free new_delete realloc string_ex1 \
		string_ex2 struct_ex1_c struct_ex1_cpp struct_ex2 struct_func_ex_c \
		struct_func_ex_cpp