-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 900 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
33
34
35
36
37
38
39
40
# get arch name
ARCH = $(shell uname -m)
TARGET = dsktools
DEPS = dsk.h
OBJS = dsk.o
CFLAGS = -I. -g -Wall
LIBNAME = libdsk.a
LFLAGS += -L. -ldsk -lm
all: $(LIBNAME) $(TARGET) dsk_new dsk_format dsk_add dsk_extract dsk_rename dsk_del
$(LIBNAME): $(OBJS)
ar rcs $(LIBNAME) $(OBJS)
dsk_new: dsk_new.o $(LIBNAME)
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
dsk_format: dsk_format.o $(LIBNAME)
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
dsk_add: dsk_add.o $(LIBNAME)
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
dsk_extract: dsk_extract.o $(LIBNAME)
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
dsk_rename: dsk_rename.o $(LIBNAME)
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
dsk_del: dsk_del.o $(LIBNAME)
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
$(TARGET): $(OBJS) main.o
$(CC) $(CFLAGS) -o $@ $^ $(LFLAGS)
install:
sudo ./links.sh
clean:
rm $(TARGET) $(LIBNAME) $(OBJS) *.o dsk_new dsk_format dsk_add dsk_extract dsk_rename dsk_del