File: Makefile

package info (click to toggle)
hd-idle 1.05%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 132 kB
  • sloc: ansic: 322; makefile: 37; sh: 30
file content (54 lines) | stat: -rw-r--r-- 1,043 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
43
44
45
46
47
48
49
50
51
52
53
54
###############################################################################
#
# General Definitions
#
###############################################################################

ifdef DESTDIR
# dh_auto_install (Debian) sets this variable
  TARGET_DIR = $(DESTDIR)/usr
else
  TARGET_DIR ?= /usr/local
endif

LIB_DIRS   = 

INC_DIRS   = 

CC        ?= gcc
CFLAGS    += $(INC_DIRS) -Wall

LD         = $(CC)
LDFLAGS   += $(LIB_DIRS)

###############################################################################
#
# Main Dependencies
#
###############################################################################

TARGET  = hd-idle

LIBS    = 

SRCS    = hd-idle.c

OBJS    = $(SRCS:.c=.o)

all: $(TARGET)

distclean: clean

clean:
	rm -f $(OBJS) $(TARGET)

install: $(TARGET)
	install -D -g root -o root $(TARGET) $(TARGET_DIR)/sbin/$(TARGET)
	install -D -g root -o root $(TARGET).1 $(TARGET_DIR)/share/man/man1/$(TARGET).1

hd-idle.o:     hd-idle.c

$(TARGET): $(OBJS)
	$(LD) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIB_DIRS) $(LIBS)