summaryrefslogtreecommitdiff
path: root/uisimulator/win32/Makefile.vc6
blob: d92f18d86d25c1619f413b4e6d68492ca28eec53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
############################################################################
#             __________               __   ___.                  
#   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___  
#   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /  
#   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <   
#   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
#                     \/            \/     \/    \/            \/ 
# $Id$
#
# Copyright (C) 2002 by Felix Arends
#
# 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.
#
############################################################################


#CHANGE THIS FIELD TO SPECIFY RECORDER OR PLAYER (Player does not work very well atm)
TARGET = RECORDER

FIRMWAREDIR = ../../firmware
DRIVERS = $(FIRMWAREDIR)/drivers
COMMON = $(FIRMWAREDIR)/common
APPSCOMMON = ../common
TOOLSDIR = ..\..\tools
SIMDIR = ../win32/
APPDIR = ../../apps/
PLAYERDIR = $(APPDIR)player/
RECDIR = $(APPDIR)recorder/
RM = del
LANGUAGE = english
FONT = $(FIRMWAREDIR)/fonts/clR6x8.bdf

!IF ("$(TARGET)" == "RECORDER")
DISPLAY = -DHAVE_LCD_BITMAP
KEYPAD = -DHAVE_RECORDER_KEYPAD
MODEL_SPECIFIC_DIR = $(RECDIR)
!ELSE
DISPLAY = -DHAVE_LCD_CHARCELLS
KEYPAD = -DHAVE_PLAYER_KEYPAD
MODEL_SPECIFIC_DIR = $(PLAYERDIR)
!ENDIF

CC = cl
RC = rc
LINK = link
DEFINES = $(DEFINES) -DWIN32 -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"WIN32SIM\"
LDFLAGS = /OUT:uisw32.exe /SUBSYSTEM:windows /NOLOGO /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib
INCLUDES = -I$(FIRMWAREDIR)/export -I$(DRIVERS) -I$(COMMON) -I$(APPSCOMMON) -I$(SIMDIR) -I$(APPDIR) -I$(MODEL_SPECIFIC_DIR)
LIBS = /DEFAULTLIB:gdi32.lib /DEFAULTLIB:user32.lib /NODEFAULTLIB:libc.lib

CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) /MD /Fd"Release/vc70.pdb" /c

SRCS =	*.c \
	$(DRIVERS)/power.c \
	$(APPDIR)*.c \
	$(APPSCOMMON)/lcd-common.c $(APPSCOMMON)/mpegplay.c $(APPSCOMMON)/sim_icons.c $(APPSCOMMON)/stubs.c \
	$(FIRMWAREDIR)/mpeg.c $(FIRMWAREDIR)/id3.c $(FIRMWAREDIR)/usb.c $(FIRMWAREDIR)/mpeg.c $(FIRMWAREDIR)/font.c $(FIRMWAREDIR)/powermgmt.c \
        $(COMMON)/sprintf.c $(COMMON)/strtok.c $(COMMON)/errno.c 

!IF ("$(DISPLAY)" == "-DHAVE_LCD_BITMAP")
SRCS = $(SRCS) $(RECDIR)/bmp.c $(RECDIR)/bounce.c  $(RECDIR)/cube.c  $(RECDIR)/icons.c  $(RECDIR)/keyboard.c $(RECDIR)/peakmeter.c \
       $(RECDIR)/snow.c $(RECDIR)/sokoban.c $(RECDIR)/tetris.c $(RECDIR)/widgets.c $(RECDIR)/wormlet.c $(DRIVERS)/lcd-recorder.c
!ELSE
SRCS = $(SRCS) $(APPSCOMMON)/lcd-playersim.c $(DRIVERS)/lcd-player.c $(PLAYERDIR)*.c
!ENDIF

OBJS = lang.obj $(SRCS:.c=.obj) uisw32.res

all : uisw32.exe

$(APPDIR)credits.raw:
  perl $(APPDIR)credits.pl < ../../docs/CREDITS > $(APPDIR)credits.raw

kernel.obj:
  $(CC) $(CFLAGS) *.c

sysfont.c: $(FONT)
  $(TOOLSDIR)\convbdf -c -o sysfont.c $(FONT)

sysfont.obj: sysfont.c
  $(CC) $(CFLAGS) sysfont.c

uisw32.exe: $(APPDIR)credits.raw $(OBJS) sysfont.obj kernel.obj
 $(LINK) $(LIBS) $(LDFLAGS) *.obj uisw32.res

uisw32.res:
 $(RC) /r uisw32.rc

build.lang: $(APPDIR)/lang/$(LANGUAGE).lang
	perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $(APPDIR)/lang/$(LANGUAGE).lang > build.lang

lang.obj: build.lang
	perl -s $(TOOLSDIR)/genlang -p=lang build.lang
	$(CC) $(CFLAGS) -c lang.c -o lang.obj

clean:
 $(RM) *.obj ..\..\apps\lang.c ..\..\apps\lang.h ..\..\apps\credits.raw lang.build uisw32.res uisw32.exe