Initial commit
[amiga/BoopsiListView.git] / SMakefile
1 ##
2 ##      $VER: LVDemo_Makefile 2.2 (14.9.97)
3 ##
4 ##      Copyright (C) 1996,97 by Bernardo Innocenti
5 ##
6 ##
7
8 ###########################################################
9 # Name of the main executable
10 ###########################################################
11 #
12 PROJ = LVDemo
13
14
15 ###########################################################
16 # Package configuration
17 ###########################################################
18 #
19
20 # set to OS30_ONLY to leave out support for old V37
21 # set to ANY_OS to make an executable for V37 with V39 support
22 #
23 #OSVER = ANY_OS
24 OSVER = OS30_ONLY
25
26 # Cpu to compile for (eg: "68020").
27 #
28 #CPU = 68000
29 CPU = 68020
30
31 ###########################################################
32 # Object files in this project
33 ###########################################################
34 #
35 OBJS = startup_sc.o LVDemo.o ListViewHooks.o \
36  ListViewClass.o ListBoxClass.o ScrollButtonClass.o
37
38
39 ###########################################################
40 # Make the project
41 ###########################################################
42 #
43 all: $(PROJ)
44
45
46 ###########################################################
47 # Remove all targets and intermediate files
48 ###########################################################
49 #
50 clean:
51         -Delete $(PROJ) $(OBJS) $(PROJ).gst
52
53
54 ###########################################################
55 # Compiler, linker and assembler flags
56 ###########################################################
57 #
58 # Note: Using the "STRINGSCONST" compiler option requires
59 #       patched versions of the OS headers to work correctly
60 #
61
62 # Compiler flags for both release and debug versions
63 #
64 COMMON_CFLAGS = PARAMETERS=REGISTERS STRINGMERGE NOSTACKCHECK NOCHECKABORT \
65         NOICONS NOVERSION ERRORREXX NOLINK DATA=NEAR CODE=NEAR \
66         STRSECT=CODE STRINGSCONST GST $(PROJ).gst DEF=$(OSVER) CPU=$(CPU)
67
68 # Compiler optimization flags
69 #
70 OPT_CFLAGS = OPTIMIZE OPTTIME OPTSCHEDULER OPTINLINELOCAL \
71         OPTRDEPTH=4 OPTDEPTH=4 OPTCOMP=8
72
73 # Debug flags: don't optimize and include all symbols in debug hunks
74 #
75 DEBUG_CFLAGS = NOOPTIMIZE DEBUG=FULLFLUSH ONERROR=CONTINUE DEF DEBUG CODE=FAR
76
77 # Use the utility.library for 32bit multiplication and division.
78 #
79 UTILLIB_LFLAGS = DEFINE __CXM33=__UCXM33 DEFINE __CXD33=__UCXD33 \
80         DEFINE __CXM22=__UCXM22 DEFINE __CXD22=__UCXD22
81
82
83 # RELEASE version should be compiled with these flags
84 #
85 #CFLAGS = $(COMMON_CFLAGS) $(OPT_CFLAGS)
86 #LFLAGS = NODEBUG SMALLCODE SMALLDATA NOALVS NOICONS $(UTILLIB_LFLAGS)
87 #LIBS = LIB LIB:sc.lib
88
89
90 # DEBUG version should be compiled with these flags
91 #
92 CFLAGS = $(COMMON_CFLAGS) $(DEBUG_CFLAGS)
93 LFLAGS = ADDSYM SMALLCODE SMALLDATA BATCH NOALVS NOICONS $(UTILLIB_LFLAGS)
94 LIBS = LIB LIB:debug.lib LIB:sc.lib LIB:small.lib
95
96
97 ###########################################################
98 # Make Global Symbol Table to speed up compiling
99 ###########################################################
100 #
101 # We must define some symbols here because defining them
102 # inside GST.c won't work as expected.
103 #
104 # NOTE: The GST file does not depend on ListViewClass.h because
105 #       otherwise all objects would be remade whenever I slightly edit
106 #       the header file.
107 #
108
109 $(PROJ).gst: GST.c
110         $(CC) FROM GST.c MAKEGST $(PROJ).gst NOOBJNAME $(CFLAGS) \
111          DEF=INTUI_V36_NAMES_ONLY DEF=__USE_SYSBASE \
112          DEF=CLIB_ALIB_PROTOS_H DEF=LV_GADTOOLS_STUFF
113
114 ###########################################################
115 # Make the executable
116 ###########################################################
117 #
118 # NOTE: Using implicit make rule to compile C files:
119 #       .c.o:
120 #               $(CC) $(CFLAGS) $(*).c
121 #
122 # NOTE: Using implicit make rule to assemble startup_sc.s
123 #
124
125 $(PROJ): $(PROJ).gst $(OBJS)
126         $(LD) FROM $(OBJS) TO $(PROJ) $(LIBS) $(LFLAGS)
127
128
129 ###########################################################
130 # Dependencies
131 ###########################################################
132 #
133 ListViewClass.o:                ListViewClass.c
134 ListBoxClass.o:                 ListBoxClass.c
135 ScrollButtonClass.o:    ScrollButtonClass.c
136 LVDemo.o:                               LVDemo.c