forked from ahouston/setblocksize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
112 lines (92 loc) · 2.58 KB
/
Makefile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# ******************************************************************************
# Header
#
# Project: setblocksize
# This file: Makefile
#
# Description: Makefile to build setblocksize
#
# Copyright: (C) 2002 by Michael Baeuerle
# License: GPL V2 or any later version
#
# Language: GNU make
# Style rules: -
#
# Written for: Platform: all
# OS: UNIX
# Tested with: Interpreter: GNU make (Version 3.77)
# Platform: IA32 (Pentium)
# OS: GNU/Linux (Kernel version: 2.2.10)
# Tested with: Interpreter: GNU make (Version 3.77)
# Platform: IA32-SMP (2x PentiumPro)
# OS: GNU/Linux (Kernel version: 2.2.17)
# Tested with: Compiler: gcc (Version: 3.3.6)
# Platform: IA32 (PentiumPro)
# OS: GNU/Linux (Kernel version: 2.6.16.20)
# Do not work: Platform: non GNU/Linux
#
# Changelog:
#
# 2002-01-16 by Michael Baeuerle
# Initial version
#
# 2003-03-22 by Michael Baeuerle
# Minor changes
#
#
# To do: -
# ******************************************************************************
# ******************************************************************************
# Makro definitions
# ******************************************************************************
# Version
VER = V0.2
# Target names
TARGET = setblocksize
# Compilers
C1 = gcc
# Flags
C1FLAGS = -I $(INCLUDE) -D_REENTRANT -Wall -pipe
A1FLAGS =
A2FLAGS =
# Include file and library directory
INCLUDE = ./include
LIBDIR = ./lib
# ******************************************************************************
# Main rules
# ******************************************************************************
# Create binary
all: $(TARGET)
@echo
@echo "Finished."
@echo
# Delete all object and binary files
# (this forces a complete re-build for "make all")
clean:
@echo
@echo "Deleting all binary object and archive files ..."
-rm -f ./*.o
-rm -f ./$(TARGET)
-rm -f ../$(TARGET)-$(VER).tar
@echo
# Create archive of the sources
dist: clean
@echo "Creating archive of sources ..."
tar -C . -cvf ../$(TARGET)-$(VER).tar ./*
@echo
# ******************************************************************************
# Sub rules
# ******************************************************************************
$(TARGET): $(TARGET).o sg_err.o
@echo
@echo "Creating binary ..."
$(C1) -o $(TARGET) $(TARGET).o sg_err.o
$(TARGET).o: $(TARGET).c
@echo
@echo "Creating main object file ..."
$(C1) $(C1FLAGS) -c -o $(TARGET).o $(TARGET).c
sg_err.o: sg_err.c
@echo
@echo "Creating error handling object file ..."
$(C1) $(C1FLAGS) -c -o sg_err.o sg_err.c
# EOF