-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
32 lines (22 loc) · 858 Bytes
/
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
# Copyright © 2008-2024 David Caldwell <[email protected]>
# Copyright © 2009 Jim Radford <[email protected]>
PLATFORM := $(shell uname -s | sed -e s/Linux/linux/ -e s/Darwin/macosx/)
DEBUG = -g
CFLAGS += -MMD -std=gnu99 -Wall -Wno-parentheses $(DEBUG) $(CFLAGS-$(PLATFORM))
LDFLAGS += $(DEBUG) $(LDFLAGS-$(PLATFORM))
LDLIBS += $(LDLIBS-$(PLATFORM))
TARGETS = gdisk
all: $(TARGETS)
gdisk: gdisk.o guid.o partition-type.o mbr.o device.o autolist.o csprintf.o human.o xmem.o dalloc.o device-$(PLATFORM).o
gdisk: LDLIBS += -lreadline -lz
gdisk: LDLIBS-linux += -luuid
gdisk.o gdisk.E: CFLAGS-macosx += -Drl_filename_completion_function=filename_completion_function
%.E: %.c Makefile
$(CC) -E -o $@ $(CFLAGS) $(CPPFLAGS) $<
TAGS: *.c
find . -name "*.[ch]" | etags -
clean:
rm -f *.o
rm -f $(TARGETS)
-include *.d
include Makefile.quiet