blob: c892f1c615b54257f4f4615aeed5674817f755f3 [file] [log] [blame]
Daniel Stenbergcdde25b2005-02-18 13:47:17 +00001############################################################################
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8# $Id$
9#
10# Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se>
11#
12# All files in this archive are subject to the GNU General Public License.
13# See the file COPYING in the source tree root for full license agreement.
14#
15# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16# KIND, either express or implied.
17#
18############################################################################
19
20DEPFILE = $(OBJDIR)/dep-commonsim
21
22RM = rm -f
23DEBUG = -g
24
25# Use this for simulator-only files
Linus Nielsen Feltzingc8492192006-07-27 13:27:31 +000026INCLUDES = -I. -I$(OBJDIR) $(TARGET_INC) -I$(FIRMDIR)/export -I$(APPSDIR) \
Thomas Martitz57613ea2010-07-10 13:49:49 +000027-I$(ROOTDIR)/uisimulator/sdl -I$(BUILDDIR)
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000028
Daniel Stenberg0bf50f02005-03-06 15:53:44 +000029# This sets up 'SRC' based on the files mentioned in SOURCES
30include $(TOOLSDIR)/makesrc.inc
31
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000032OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
33
34DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
Rafaël Carré5d236b22010-05-27 09:41:46 +000035$(TARGET) -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES)
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000036
37SOURCES = $(SRC)
38
39DIRS = .
40
41CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) $(GCCOPTS)
42
Daniel Stenbergb8a23f9e2005-05-07 22:41:17 +000043OUTFILE = $(BUILDDIR)/libcomsim.a
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000044
45all: $(OUTFILE)
46
47include $(TOOLSDIR)/make.inc
48
49clean:
Jens Arnolda7962602006-10-27 21:48:06 +000050 $(call PRINTS,cleaning commonsim)$(RM) $(OBJS) *~ core $(DEPFILE) $(OUTFILE)
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000051
52$(OUTFILE): $(OBJS)
Jens Arnolda7962602006-10-27 21:48:06 +000053 $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1
54 $(SILENT)$(RANLIB) $@
Daniel Stenbergcdde25b2005-02-18 13:47:17 +000055
56-include $(DEPFILE)