Subversion Repositories HelenOS-historic

Rev

Rev 1419 | Rev 1466 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1419 Rev 1449
Line -... Line 1...
-
 
1
LIBC_PREFIX = ../libc
-
 
2
SOFTINT_PREFIX = ../softint
1
#	$OpenBSD: Makefile,v 1.7 2002/05/31 03:46:35 pjanzen Exp $
3
include $(LIBC_PREFIX)/Makefile.toolchain
2
 
4
 
3
PROG=	tetris
-
 
4
SRCS=	input.c screen.c shapes.c scores.c tetris.c
-
 
5
MAN=	tetris.6
-
 
6
DPADD=	${LIBCURSES}
5
LIBS = $(LIBC_PREFIX)/libc.a
7
LDADD=	-lcurses
-
 
8
BINMODE=2555
-
 
9
 
-
 
10
beforeinstall:
-
 
11
	@if [ ! -f ${DESTDIR}/var/games/tetris.scores ]; then \
-
 
12
	    ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 664 \
-
 
13
		/dev/null ${DESTDIR}/var/games/tetris.scores ; \
-
 
14
	else \
-
 
15
		true ; \
-
 
16
	fi
-
 
17
 
6
 
-
 
7
OUTPUT = tetris
-
 
8
SOURCES = shapes.c tetris.c scores.c input.c screen.c
-
 
9
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
 
10
 
-
 
11
.PHONY: all clean depend disasm
-
 
12
 
-
 
13
all: $(OUTPUT)
-
 
14
 
18
.include <bsd.prog.mk>
15
-include Makefile.depend
-
 
16
 
-
 
17
depend:
-
 
18
	$(CC) $(DEFS) $(CFLAGS) -M $(SOURCES) > Makefile.depend
-
 
19
 
-
 
20
$(OUTPUT): $(OBJECTS) $(LIBS)
-
 
21
	$(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
 
22
 
-
 
23
clean:
-
 
24
	-rm -f $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm Makefile.depend *.o
-
 
25
disasm:
-
 
26
	$(OBJDUMP) -d $(OUTPUT) >$(OUTPUT).disasm
-
 
27
 
-
 
28
%.o: %.S
-
 
29
	$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
-
 
30
 
-
 
31
%.o: %.s
-
 
32
	$(AS) $(AFLAGS) $< -o $@
-
 
33
 
-
 
34
%.o: %.c
-
 
35
	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@