Makefile 3 KB
Newer Older
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
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
#
# This file is part of 'pdp', a PDP-11 simulator.
#
# For information contact:
#
#   Computer Science House
#   Attn: Eric Edwards
#   Box 861
#   25 Andrews Memorial Drive
#   Rochester, NY 14623
#
# Email:  mag@potter.csh.rit.edu
# FTP:    ftp.csh.rit.edu:/pub/csh/mag/pdp.tar.Z
# 
# Copyright 1994, Eric A. Edwards
#
# Permission to use, copy, modify, and distribute this
# software and its documentation for any purpose and without
# fee is hereby granted, provided that the above copyright
# notice appear in all copies.  Eric A. Edwards makes no
# representations about the suitability of this software
# for any purpose.  It is provided "as is" without expressed
# or implied warranty.
#
# Makefile
#
#

#
# Change as needed
#

CC = gcc -std=gnu89
LD = gcc
gameblabla's avatar
gameblabla committed
35
CFLAGS = -O1 -fno-common -g -DSHIFTS_ALLOWED -DEIS_ALLOWED
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
36
37
38
39
40
41
# CFLAGS = -O4 -fomit-frame-pointer # -DSHIFTS_ALLOWED

#
# Targets
#

gameblabla's avatar
gameblabla committed
42
TARGET = bk.elf
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
43
44
45
46
47
48
49
UTILS = maketape readtape

#
# Source and Object Files
#

SRCS =	access.c boot.c branch.c conf.c covox.c double.c ea.c itab.c \
50
	main.c service.c ui.c scr-sdl.c scr.c timer.c tape.c disk.c mouse.c printer.c \
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
51
	single.c weird.c tty.c io.c timing.c sound.c disas.c serial.c bkplip.c \
Vladimir Serbinenko's avatar
Vladimir Serbinenko committed
52
	terakdisk.c synth.c emu2149.c standalone.c sdlsound.c sdltty.c  joystick.c
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
53
OBJS =	access.o boot.o branch.o conf.o covox.o double.o ea.o itab.o icon.o \
54
	main.o service.o ui.o scr-sdl.o scr.o timer.o tape.o disk.o mouse.o printer.o \
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
55
	single.o weird.o tty.o io.o timing.o sound.o disas.o serial.o bkplip.o \
Vladimir Serbinenko's avatar
Vladimir Serbinenko committed
56
	terakdisk.o synth.o emu2149.o standalone.o sdlsound.o sdltty.o  joystick.o
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
INCS =	defines.h scr.h conf.h emu2149.h emutypes.h
USRCS = readtape.c maketape.c pngtorgba.c
TEXTS =	README.html configure.in icon.c

#
# Build Rules
#

everything:	$(TARGET) $(UTILS)
	touch everything

.c.o:
	$(CC) -c $(CFLAGS) $<

icon.c: pngtorgba bk.png
	touch icon.c
	if [ ! -s icon.c ] ; then ./pngtorgba bk.png > icon.c ; fi

$(TARGET):	$(OBJS)
gameblabla's avatar
gameblabla committed
76
	$(LD) $(CFLAGS) -o $(TARGET) $(OBJS) -lSDL  -lpthread
Michael Stolovitzsky's avatar
Michael Stolovitzsky committed
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

readtape: readtape.c
	$(CC) $(CFLAGS) -o readtape readtape.c

maketape: maketape.c
	$(CC) $(CFLAGS) -o maketape maketape.c

#
# Cool Utilities
#

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

count:
	wc -l $(SRCS) $(USRCS)

dist:
	tar czvf bk-terak-emu.`date +%Y.%m.%d`.tar.gz \
	--exclude CVS $(SRCS) $(INCS) $(USRCS) po Rom $(TEXTS) Makefile bk.png

depend:
	makedepend -Dlinux=1 -Y $(SRCS) $(USRCS) $(INCS)

# DO NOT DELETE

access.o: defines.h
boot.o: defines.h
branch.o: defines.h
conf.o: conf.h defines.h scr.h
covox.o: defines.h
double.o: defines.h
ea.o: defines.h
itab.o: defines.h
main.o: defines.h scr.h
service.o: defines.h
ui.o: defines.h
scr.o: defines.h scr.h
timer.o: defines.h
tape.o: defines.h
disk.o: defines.h
mouse.o: defines.h
printer.o: defines.h
single.o: defines.h
weird.o: defines.h
tty.o: defines.h
io.o: defines.h
timing.o: defines.h
sound.o: defines.h
disas.o: defines.h
serial.o: defines.h
bkplip.o: defines.h
terakdisk.o: defines.h
synth.o: defines.h emu2149.h emutypes.h
emu2149.o: emu2149.h emutypes.h
conf.o: defines.h
emu2149.o: emutypes.h