OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [Makefile] - Blame information for rev 246

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 hellwig
#
2
# Makefile for ECO32 simulator
3
#
4
 
5
BUILD = ../build
6
 
7
CC = gcc -m32
8
CFLAGS = -g -Wall -I./getline -I/usr/X11R7/include
9
LDFLAGS = -g -L./getline -L/usr/X11R7/lib -Wl,-rpath -Wl,/usr/X11R7/lib
10
LDLIBS = -lgetline -lX11 -lpthread -lm
11
 
12
SRCS = main.c console.c error.c except.c command.c \
13
       instr.c asm.c disasm.c cpu.c mmu.c memory.c \
14 246 hellwig
       timer.c dspkbd.c serial.c disk.c output.c \
15
       shutdown.c graph.c
16 8 hellwig
OBJS = $(patsubst %.c,%.o,$(SRCS))
17
BIN = sim
18
 
19
.PHONY:         all install clean
20
 
21
all:            $(BIN)
22
 
23
install:        $(BIN)
24
                mkdir -p $(BUILD)/bin
25
                cp $(BIN) $(BUILD)/bin
26
 
27
getline/libgetline.a:
28
                $(MAKE) -C getline
29
 
30
$(BIN):         $(OBJS) getline/libgetline.a
31
                $(CC) $(LDFLAGS) -o $(BIN) $(OBJS) $(LDLIBS)
32
 
33
%.o:            %.c
34
                $(CC) $(CFLAGS) -o $@ -c $<
35
 
36
depend.mak:
37 24 hellwig
                $(CC) -MM -MG $(CFLAGS) $(SRCS) >depend.mak
38 8 hellwig
 
39
-include depend.mak
40
 
41
clean:
42
                $(MAKE) -C getline clean
43
                rm -f *~ $(OBJS) $(BIN) depend.mak

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.