blob: bd9db18e01dcaa41db2135113391bb2161e4c338 [file] [log] [blame]
Daniel Stenbergac9ebde2002-08-02 12:15:38 +00001############################################################################
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8# $Id$
9#
10# Copyright (C) 2002 by Felix Arends
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
Justin Heinerba349222002-09-04 01:51:09 +000020
Felix Arends879fabd2002-10-16 16:26:09 +000021#CHANGE THIS FIELD TO SPECIFY RECORDER OR PLAYER (Player does not work very well atm)
Justin Heinerba349222002-09-04 01:51:09 +000022TARGET = RECORDER
23
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000024FIRMWAREDIR = ../../firmware
25DRIVERS = $(FIRMWAREDIR)/drivers
26COMMON = $(FIRMWAREDIR)/common
27APPSCOMMON = ../common
Felix Arends879fabd2002-10-16 16:26:09 +000028TOOLSDIR = ..\..\tools
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000029SIMDIR = ../win32/
30APPDIR = ../../apps/
Justin Heinerba349222002-09-04 01:51:09 +000031PLAYERDIR = $(APPDIR)player/
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000032RECDIR = $(APPDIR)recorder/
33RM = del
Felix Arends879fabd2002-10-16 16:26:09 +000034LANGUAGE = english
35FONT = $(FIRMWAREDIR)/fonts/clR6x8.bdf
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000036
37!IF ("$(TARGET)" == "RECORDER")
38DISPLAY = -DHAVE_LCD_BITMAP
39KEYPAD = -DHAVE_RECORDER_KEYPAD
Justin Heinerba349222002-09-04 01:51:09 +000040MODEL_SPECIFIC_DIR = $(RECDIR)
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000041!ELSE
42DISPLAY = -DHAVE_LCD_CHARCELLS
43KEYPAD = -DHAVE_PLAYER_KEYPAD
Justin Heinerba349222002-09-04 01:51:09 +000044MODEL_SPECIFIC_DIR = $(PLAYERDIR)
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000045!ENDIF
46
47CC = cl
48RC = rc
49LINK = link
Felix Arends879fabd2002-10-16 16:26:09 +000050DEFINES = $(DEFINES) -DWIN32 -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"WIN32SIM\"
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000051LDFLAGS = /OUT:uisw32.exe /SUBSYSTEM:windows /NOLOGO /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib
Justin Heinerba349222002-09-04 01:51:09 +000052INCLUDES = -I$(FIRMWAREDIR) -I$(DRIVERS) -I$(COMMON) -I$(APPSCOMMON) -I$(SIMDIR) -I$(APPDIR) -I$(MODEL_SPECIFIC_DIR)
Felix Arendsb1819f62002-08-22 17:58:24 +000053LIBS = /DEFAULTLIB:gdi32.lib /DEFAULTLIB:user32.lib
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000054
55CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb" /c
56
Felix Arends879fabd2002-10-16 16:26:09 +000057SRCS = *.c \
58 $(DRIVERS)/power.c \
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000059 $(APPDIR)*.c \
Felix Arends879fabd2002-10-16 16:26:09 +000060 $(PLAYERDIR)*.c \
61 $(APPSCOMMON)/lcd-common.c $(APPSCOMMON)/mpegplay.c $(APPSCOMMON)/sim_icons.c $(APPSCOMMON)/stubs.c \
62 $(FIRMWAREDIR)/mpeg.c $(FIRMWAREDIR)/id3.c $(FIRMWAREDIR)/usb.c $(FIRMWAREDIR)/mpeg.c $(FIRMWAREDIR)/font.c $(FIRMWAREDIR)/powermgmt.c \
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000063 $(COMMON)/sprintf.c $(COMMON)/strtok.c
64
65!IF ("$(DISPLAY)" == "-DHAVE_LCD_BITMAP")
Felix Arends879fabd2002-10-16 16:26:09 +000066SRCS = $(SRCS) $(RECDIR)*.c $(DRIVERS)/lcd-recorder.c
67!ELSE
Felix Arends57dcf0b2002-10-18 15:22:20 +000068SRCS = $(SRCS) $(APPSCOMMON)/lcd-playersim.c $(DRIVERS)/lcd-player.c
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000069!ENDIF
70
Felix Arends879fabd2002-10-16 16:26:09 +000071OBJS = lang.obj $(SRCS:.c=.obj) uisw32.res
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000072
Felix Arends879fabd2002-10-16 16:26:09 +000073all : uisw32.exe
74
75$(APPDIR)credits.raw:
76 perl $(APPDIR)credits.pl < ../../docs/CREDITS > $(APPDIR)credits.raw
77
78kernel.obj:
79 $(CC) $(CFLAGS) *.c
80
81sysfont.c: $(FONT)
82 $(TOOLSDIR)\convbdf -c -o sysfont.c $(FONT)
83
84sysfont.obj: sysfont.c
85 $(CC) $(CFLAGS) sysfont.c
86
87uisw32.exe: $(APPDIR)credits.raw $(OBJS) sysfont.obj kernel.obj
88 $(LINK) $(LIBS) $(LDFLAGS) *.obj uisw32.res
89
90uisw32.res:
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000091 $(RC) /r uisw32.rc
Felix Arends879fabd2002-10-16 16:26:09 +000092
93build.lang: $(APPDIR)/lang/$(LANGUAGE).lang
94 perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $(APPDIR)/lang/$(LANGUAGE).lang > build.lang
95
96lang.obj: build.lang
97 perl -s $(TOOLSDIR)/genlang -p=lang build.lang
98 $(CC) $(CFLAGS) -c lang.c -o lang.obj
Daniel Stenbergac9ebde2002-08-02 12:15:38 +000099
100clean:
Felix Arends879fabd2002-10-16 16:26:09 +0000101 $(RM) *.obj lang.c lang.h ..\..\apps\credits.raw lang.build uisw32.res uisw32.exe