Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 1 | ############################################################################ |
| 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 | |
| 20 | DEPFILE = $(OBJDIR)/dep-commonsim |
| 21 | |
| 22 | RM = rm -f |
| 23 | DEBUG = -g |
| 24 | |
| 25 | # Use this for simulator-only files |
Linus Nielsen Feltzing | c849219 | 2006-07-27 13:27:31 +0000 | [diff] [blame] | 26 | INCLUDES = -I. -I$(OBJDIR) $(TARGET_INC) -I$(FIRMDIR)/export -I$(APPSDIR) \ |
Thomas Martitz | 57613ea | 2010-07-10 13:49:49 +0000 | [diff] [blame] | 27 | -I$(ROOTDIR)/uisimulator/sdl -I$(BUILDDIR) |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 28 | |
Daniel Stenberg | 0bf50f0 | 2005-03-06 15:53:44 +0000 | [diff] [blame] | 29 | # This sets up 'SRC' based on the files mentioned in SOURCES |
| 30 | include $(TOOLSDIR)/makesrc.inc |
| 31 | |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 32 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) |
| 33 | |
| 34 | DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ |
Rafaël Carré | 5d236b2 | 2010-05-27 09:41:46 +0000 | [diff] [blame] | 35 | $(TARGET) -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 36 | |
| 37 | SOURCES = $(SRC) |
| 38 | |
| 39 | DIRS = . |
| 40 | |
| 41 | CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) $(GCCOPTS) |
| 42 | |
Daniel Stenberg | b8a23f9e | 2005-05-07 22:41:17 +0000 | [diff] [blame] | 43 | OUTFILE = $(BUILDDIR)/libcomsim.a |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 44 | |
| 45 | all: $(OUTFILE) |
| 46 | |
| 47 | include $(TOOLSDIR)/make.inc |
| 48 | |
| 49 | clean: |
Jens Arnold | a796260 | 2006-10-27 21:48:06 +0000 | [diff] [blame] | 50 | $(call PRINTS,cleaning commonsim)$(RM) $(OBJS) *~ core $(DEPFILE) $(OUTFILE) |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 51 | |
| 52 | $(OUTFILE): $(OBJS) |
Jens Arnold | a796260 | 2006-10-27 21:48:06 +0000 | [diff] [blame] | 53 | $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 |
| 54 | $(SILENT)$(RANLIB) $@ |
Daniel Stenberg | cdde25b | 2005-02-18 13:47:17 +0000 | [diff] [blame] | 55 | |
| 56 | -include $(DEPFILE) |