- 论坛徽章:
- 0
|
# make Makefile
UX:make: ERROR: Must be a separator on rules line 20 (bu39).
系统:Unixware 7.1.1
GCC:2.8.0
我的Makefile内容如下:
-------------
# Uncomment the one corresponding with your system
#ZZZ=Z80_PORTS="\"$(HOME)/.Z80_ports\""
ZZZ=Z80_PORTS="\"./.Z80_ports\""
#SYSTEM=DOS
SYSTEM=UNIX
DEFINES=-DFURTHER_HARDWARE
#DEFINES=-DFURTHER_HARDWARE -DZ80_CTC
# set the appropriate install directories in your system
MAN_DIR=/usr/local/man
BIN_DIR=/usr/local/bin
#--------- You shouldn't need to change anything under this line ---------------
HW=hardware/hard.a
ifeq (UNIX, $(SYSTEM))
RM=rm -f
ASM=z80-asm
MONI=z80-mon
else
RM=del
ASM=z80-asm.exe
MONI=z80-mon.exe
endif
CFLAGS=-O2 -Wall -D$(ZZZ) -D$(SYSTEM) $(DEFINES) -W -Wstrict-prototypes \
-Wno-parentheses -fomit-frame-pointer -malign-functions=0
LDFLAGS=
all:
cd hardware; $(MAKE) hard.a
make $(ASM)
make $(MONI)
cd hardware; $(MAKE)
clean:
$(RM) *.o
$(RM) $(ASM)
$(RM) $(MONI)
$(RM) asm.a
$(RM) cpu.a
cd hardware; make clean
install:
chmod a+rx $(ASM) $(MONI); cp -p $(ASM) $(MONI) $(BIN_DIR)
chmod a+r doc/z80-*.1; cp -p doc/z80-*.1 $(MAN_DIR)/man1
chmod a+r doc/z80-*.3; cp -p doc/z80-*.3 $(MAN_DIR)/man3
chmod a+r doc/z80-*.5; cp -p doc/z80-*.5 $(MAN_DIR)/man5
z80-mon.o: z80-mon.c z80-cpu.h asm.h console.h console_token regs.h regs_token \
execute.h execute_token file.h memory.h interrupt.h help_layout \
mini-display.h decode.h keyboard.h ports.h hash.h hardware/z80-ctc.h
z80-asm.o: z80-asm.c hash.h asm.h file.h
z80-cpu.o: z80-global z80-cpu.c hardware/quartz.h hardware/z80-ctc.h
decode.o: decode.c z80-cpu.h z80-mon.h decode-table.h execute.h execute_token \
regs_token memory.h hardware/daisy_chain.h
instr.o: instr.c instr_token z80-cpu.h
file.o: file.c file.h
regs.o: regs.c regs_token z80-cpu.h
compile.o: compile.c asm.h execute_token regs.h regs_token
hash.o: hash.c asm.h
asm.o: asm.c asm_interface.h instr.h z80-cpu.h hash.h compile.h execute_token \
regs.h regs_token
console.o: console.c console_token
decode-table.o: decode-table.c z80-cpu.h execute.h execute_token regs.h regs_token
execute.o: execute.c z80-cpu.h execute_token regs.h regs_token decode.h asm.h \
memory.h ports.h hash.h
ports.o: ports.c z80-cpu.h mini-display.h asm_interface.h keyboard.h memory.h \
hardware/z80-ctc.h
memory.o: memory.c z80-cpu.h
interrupt.o: interrupt.c z80-cpu.h decode.h z80-mon.h hardware/daisy_chain.h
mini-display.o: mini-display.c console.h console_token
keyboard.o: keyboard.c console.h
asm.a: z80-cpu.o asm.o hash.o compile.o regs.o instr.o interrupt.o file.o \
mini-display.o keyboard.o
$(RM) asm.a
ar rcs asm.a z80-cpu.o asm.o hash.o compile.o regs.o instr.o interrupt.o \
mini-display.o keyboard.o file.o
cpu.a: execute.o decode-table.o decode.o memory.o ports.o
$(RM) cpu.a
ar rcs cpu.a execute.o decode-table.o decode.o memory.o ports.o
$(ASM): z80-asm.o asm.a $(HW)
gcc -lc -o $(ASM) z80-asm.o asm.a $(HW)
$(MONI): z80-mon.o cpu.a console.o asm.a $(HW)
gcc -lc -o $(MONI) z80-mon.o cpu.a console.o asm.a $(HW) |
|