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
|
|
|
|
|
|
|
TARGET = rockboxui
|
|
|
|
|
2002-04-28 00:00:02 +00:00
|
|
|
APPDIR= ..
|
|
|
|
FIRMWAREDIR = ../../firmware
|
2002-04-25 08:06:38 +00:00
|
|
|
DRIVERS = $(FIRMWAREDIR)/drivers
|
2002-04-11 12:41:27 +00:00
|
|
|
|
2002-03-25 14:21:30 +00:00
|
|
|
CC = gcc
|
2002-04-25 08:06:38 +00:00
|
|
|
RM = rm -f
|
|
|
|
DEBUG = -g
|
2002-04-28 08:38:51 +00:00
|
|
|
DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR -DHAVE_LCD_BITMAP -DHAVE_RECORDER_KEYPAD
|
2002-04-24 09:14:16 +00:00
|
|
|
LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl
|
2002-04-25 08:06:38 +00:00
|
|
|
|
2002-04-30 06:54:36 +00:00
|
|
|
INCLUDES = -I$(DRIVERS) -I$(FIRMWAREDIR)
|
2002-04-25 08:06:38 +00:00
|
|
|
|
2002-04-24 09:14:16 +00:00
|
|
|
UNAME := $(shell uname)
|
|
|
|
ifeq ($(UNAME),Linux)
|
2002-04-30 06:54:36 +00:00
|
|
|
INCLUDES = -I/usr/X11R6/include $(INCLUDES)
|
2002-04-19 14:12:31 +00:00
|
|
|
LIBDIRS = -L/usr/X11R6/lib
|
|
|
|
else
|
|
|
|
LIBDIRS =
|
|
|
|
endif
|
2002-03-25 14:21:30 +00:00
|
|
|
|
2002-04-25 08:06:38 +00:00
|
|
|
CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES)
|
2002-03-25 14:21:30 +00:00
|
|
|
|
2002-04-25 08:06:38 +00:00
|
|
|
#SRCS = $(wildcard *.c)
|
|
|
|
|
|
|
|
SRCS = screenhack.c uibasic.c resources.c visual.c lcd.c lcd-x11.c \
|
2002-04-27 23:41:41 +00:00
|
|
|
button-x11.c chartables.c tetris.c app.c
|
2002-04-25 08:06:38 +00:00
|
|
|
|
|
|
|
OBJS := $(SRCS:c=o)
|
2002-03-25 14:21:30 +00:00
|
|
|
|
2002-04-11 12:41:27 +00:00
|
|
|
all: $(TARGET)
|
2002-03-25 14:21:30 +00:00
|
|
|
|
|
|
|
clean:
|
2002-04-25 08:06:38 +00:00
|
|
|
$(RM) $(OBJS) *~ core $(TARGET) $(CLIENTS)
|
|
|
|
$(RM) -r $(DEPS)
|
2002-03-25 14:21:30 +00:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
$(RM) config.cache
|
|
|
|
|
2002-04-28 00:00:02 +00:00
|
|
|
tetris.o: $(APPDIR)/tetris.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
app.o: $(APPDIR)/app.c
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2002-04-24 08:09:39 +00:00
|
|
|
lcd.o: $(DRIVERS)/lcd.c
|
2002-04-25 08:06:38 +00:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2002-04-11 12:41:27 +00:00
|
|
|
|
|
|
|
chartables.o: $(FIRMWAREDIR)/chartables.c
|
2002-04-25 08:06:38 +00:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
2002-04-11 12:41:27 +00:00
|
|
|
|
2002-03-25 14:21:30 +00:00
|
|
|
.c.o:
|
2002-04-25 08:06:38 +00:00
|
|
|
$(CC) $(CFLAGS) -c $<
|
2002-03-25 14:21:30 +00:00
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
2002-03-28 07:52:15 +00:00
|
|
|
$(CC) -o $(TARGET) $(LIBDIRS) $(LDFLAGS) $(OBJS)
|
2002-03-25 14:21:30 +00:00
|
|
|
|
2002-04-25 08:06:38 +00:00
|
|
|
DEPS:=.deps
|
|
|
|
|
|
|
|
$(DEPS)/%.d: %.c
|
|
|
|
@$(SHELL) -c 'if [ ! -d $(DEPS) ]; then \
|
|
|
|
echo Creating the dependency directory: $(DEPS); \
|
|
|
|
mkdir $(DEPS); fi'
|
|
|
|
@echo "Updating Dependencies for $<"
|
|
|
|
@$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \
|
|
|
|
|sed '\''s/\($*\)\.o[ :]*/\1.o $(<:%.c=%.d) : /g'\'' > $@; \
|
|
|
|
[ -s $@ ] || rm -f $@'
|
2002-04-11 12:41:27 +00:00
|
|
|
|
2002-04-25 08:06:38 +00:00
|
|
|
-include $(SRCS:%.c=$(DEPS)/%.d)
|