Daniel Stenberg | de7bdb5 | 2002-03-25 14:42:44 +0000 | [diff] [blame] | 1 | ############################################################################ |
| 2 | # __________ __ ___. |
| 3 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | # \/ \/ \/ \/ \/ |
Daniel Stenberg | 1c51bab | 2002-03-25 14:43:36 +0000 | [diff] [blame] | 8 | # $Id$ |
Daniel Stenberg | de7bdb5 | 2002-03-25 14:42:44 +0000 | [diff] [blame] | 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 | ############################################################################ |
Daniel Stenberg | 9f6733f | 2002-03-25 14:21:30 +0000 | [diff] [blame] | 19 | |
Linus Nielsen Feltzing | 865effa | 2004-07-23 21:06:03 +0000 | [diff] [blame] | 20 | SIMCOMMON = ../common |
Linus Nielsen Feltzing | 7f22b84 | 2002-09-03 08:30:15 +0000 | [diff] [blame] | 21 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 22 | DEPFILE = $(OBJDIR)/dep-sim |
Daniel Stenberg | fa26696 | 2002-04-11 12:41:27 +0000 | [diff] [blame] | 23 | |
Björn Stenberg | 6365574 | 2002-04-25 08:06:38 +0000 | [diff] [blame] | 24 | RM = rm -f |
| 25 | DEBUG = -g |
Daniel Stenberg | f7a6c45 | 2002-05-04 12:26:21 +0000 | [diff] [blame] | 26 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 27 | # Use this for simulator-only files |
Daniel Stenberg | b8a23f9e | 2005-05-07 22:41:17 +0000 | [diff] [blame] | 28 | INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) \ |
| 29 | -I$(BUILDDIR) |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 30 | |
Daniel Stenberg | 0bf50f0 | 2005-03-06 15:53:44 +0000 | [diff] [blame] | 31 | # This sets up 'SRC' based on the files mentioned in SOURCES |
| 32 | include $(TOOLSDIR)/makesrc.inc |
| 33 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 34 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) |
Daniel Stenberg | f7da8db | 2002-05-31 07:23:07 +0000 | [diff] [blame] | 35 | |
Björn Stenberg | 8b69504 | 2004-09-16 14:36:08 +0000 | [diff] [blame] | 36 | DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ |
Jens Arnold | b4527a3 | 2005-02-11 23:56:38 +0000 | [diff] [blame] | 37 | $(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) |
Daniel Stenberg | f7a6c45 | 2002-05-04 12:26:21 +0000 | [diff] [blame] | 38 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 39 | SOURCES = $(SRC) |
Linus Nielsen Feltzing | 865effa | 2004-07-23 21:06:03 +0000 | [diff] [blame] | 40 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 41 | DIRS = . |
Linus Nielsen Feltzing | 865effa | 2004-07-23 21:06:03 +0000 | [diff] [blame] | 42 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 43 | CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) $(GCCOPTS) |
Björn Stenberg | 6365574 | 2002-04-25 08:06:38 +0000 | [diff] [blame] | 44 | |
Daniel Stenberg | b8a23f9e | 2005-05-07 22:41:17 +0000 | [diff] [blame] | 45 | OUTFILE = $(BUILDDIR)/libsim.a |
Daniel Stenberg | 0c7ebc4 | 2002-06-17 13:33:47 +0000 | [diff] [blame] | 46 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 47 | all: $(OUTFILE) |
Dave Chapman | ebb57e8 | 2002-05-12 11:34:08 +0000 | [diff] [blame] | 48 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 49 | include $(TOOLSDIR)/make.inc |
Daniel Stenberg | 9f6733f | 2002-03-25 14:21:30 +0000 | [diff] [blame] | 50 | |
| 51 | clean: |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 52 | @echo "cleaning sim" |
| 53 | @$(RM) $(OBJS) *~ core $(OUTFILE) $(DEPFILE) |
| 54 | @$(MAKE) -C $(SIMCOMMON) clean |
Daniel Stenberg | 9f6733f | 2002-03-25 14:21:30 +0000 | [diff] [blame] | 55 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 56 | $(OUTFILE): $(OBJS) |
| 57 | @echo "AR $@" |
| 58 | @$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 |
Daniel Stenberg | 0ab96fd | 2002-10-15 07:51:25 +0000 | [diff] [blame] | 59 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 60 | -include $(DEPFILE) |