File: makefile_append.ini

package info (click to toggle)
searchandrescue 0.8.2-10
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,656 kB
  • ctags: 6,111
  • sloc: ansic: 89,072; cpp: 7,691; sh: 90; makefile: 80
file content (58 lines) | stat: -rw-r--r-- 1,120 bytes parent folder | download | duplicates (5)
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
52
53
54
55
56
57
58
# Appended stuff starts here
#


# C++ flags:
CPPFLAGS = -D__cplusplus -Dc_plusplus


# Source files list:
include Makefile.srclist


# Compiler set up:
BIN     = SearchAndRescue
OBJ_C   = $(SRC_C:.c=.o)
OBJ_CPP = $(SRC_CPP:.cpp=.o)
.c.o:
	@echo "Compiling module $*.o"
	@$(CC) -c $*.c $(INC_DIRS) $(CFLAGS)
.cpp.o:
	@echo "Compiling module $*.o"
	@$(CPP) -c $*.cpp $(INC_DIRS) $(CFLAGS) $(CPPFLAGS)

# Programs
LS      = ls
LSFLAGS = -s -h -c --color=auto
RM      = rm
RMFLAGS = -f

# Build rules:
$(BIN): prebuild modules postbuild

modules: $(OBJ_C) $(OBJ_CPP)
	@echo -n "Linking modules..."
	@$(CPP) $(OBJ_C) $(OBJ_CPP) -o $(BIN) $(LIBS) $(LIB_DIRS)
	@echo -n "   "
	@-$(LS) $(LSFLAGS) $(BIN)

prebuild:
	@echo "Building program \"$(BIN)\"..."

postbuild:
	@echo "Build done."
	@echo "To install, type \"su\" (to gain root privileges) and then type \"make install\"."

all: $(BIN)


# Install Rules:
include Makefile.install.UNIX


# Maintainance and Misc Rules:
clean:
	@echo "Cleaning program \"$(BIN)\"..."
	@echo "Deleting all intermediate files..."
	@$(RM) $(RMFLAGS) a.out core *.o $(BIN)
	@echo "Clean done."