2002-03-25 14:42:44 +00:00
|
|
|
############################################################################
|
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
2002-03-25 14:43:36 +00:00
|
|
|
# $Id$
|
2002-03-25 14:42:44 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se>
|
|
|
|
#
|
|
|
|
# All files in this archive are subject to the GNU General Public License.
|
|
|
|
# See the file COPYING in the source tree root for full license agreement.
|
|
|
|
#
|
|
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
# KIND, either express or implied.
|
|
|
|
#
|
|
|
|
############################################################################
|
2002-03-25 14:21:30 +00:00
|
|
|
|
2004-07-23 21:06:03 +00:00
|
|
|
SIMCOMMON = ../common
|
2002-09-03 08:30:15 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
DEPFILE = $(OBJDIR)/dep-sim
|
2002-04-11 12:41:27 +00:00
|
|
|
|
2002-04-25 08:06:38 +00:00
|
|
|
RM = rm -f
|
|
|
|
DEBUG = -g
|
2002-05-04 12:26:21 +00:00
|
|
|
|
2002-06-17 13:33:47 +00:00
|
|
|
# Use this for simulator-only files
|
2005-02-18 13:47:17 +00:00
|
|
|
INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR)
|
2002-05-12 11:34:08 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
|
|
|
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - )
|
|
|
|
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
|
2004-07-23 21:06:03 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
|
|
|
|
$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES)
|
2002-05-02 21:30:58 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
SOURCES = $(SRC)
|
2003-06-29 16:43:15 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
DIRS = .
|
2002-03-25 14:21:30 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) $(GCCOPTS)
|
2004-07-23 21:06:03 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
OUTFILE = $(OBJDIR)/libsim.a
|
2004-07-23 21:06:03 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
all: $(OUTFILE)
|
2005-02-22 12:19:12 +00:00
|
|
|
@$(MAKE) -C $(SIMCOMMON)
|
2003-07-10 11:52:42 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
include $(TOOLSDIR)/make.inc
|
2002-03-25 14:21:30 +00:00
|
|
|
|
|
|
|
clean:
|
2005-02-18 13:47:17 +00:00
|
|
|
@echo "cleaning sim"
|
|
|
|
@$(RM) $(OBJS) *~ core $(OUTFILE) $(DEPFILE)
|
|
|
|
@$(MAKE) -C $(SIMCOMMON) clean
|
2002-03-25 14:21:30 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
$(OUTFILE): $(OBJS)
|
|
|
|
@echo "AR $@"
|
|
|
|
@$(AR) ruv $@ $(OBJS) >/dev/null 2>&1
|
2002-08-15 10:04:53 +00:00
|
|
|
|
2005-02-18 13:47:17 +00:00
|
|
|
-include $(DEPFILE)
|