Add Makefile
This commit is contained in:
parent
82f37123d1
commit
ac55efa5df
1 changed files with 23 additions and 0 deletions
23
Makefile
Normal file
23
Makefile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
CC = cc
|
||||||
|
CFLAGS = -g -Wall -O2
|
||||||
|
LDFLAGS =
|
||||||
|
OBJS = main.o
|
||||||
|
NAME = zxdump
|
||||||
|
|
||||||
|
PREFIX = /usr/local
|
||||||
|
INSTALL = /usr/bin/install
|
||||||
|
RM = /bin/rm
|
||||||
|
|
||||||
|
all: $(NAME)
|
||||||
|
|
||||||
|
$(NAME): $(OBJS)
|
||||||
|
$(CC) $(OBJS) -o $(NAME) $(LDFLAGS)
|
||||||
|
|
||||||
|
$(OBJS): %.o: %.c
|
||||||
|
$(CC) $(CFLAGS) -c $<
|
||||||
|
|
||||||
|
install: $(NAME)
|
||||||
|
$(INSTALL) -c -m 0755 $(NAME) $(PREFIX)/bin
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) -f $(NAME) $(OBJS)
|
Loading…
Add table
Reference in a new issue