MicroWindows mods
[wxWidgets.git] / samples / minimal / makefile.mic
1 ##############################################################################
2 # Microwindows template Makefile
3 # Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
4 ##############################################################################
5
6 TOP=$(MICROWINDOWS)
7 ifeq "$(MICROWINDOWS)" ""
8 TOP=/home/julians/local/microwindows/microwindows-0.89pre8/src
9 endif
10
11 CONFIG = $(TOP)/config
12 WXDIR = ../..
13 OBJSUFF = o
14 SRCSUFF = cpp
15 WXLIB=$(WXDIR)/lib/libwx.a
16 AROPTIONS = ruv
17 RANLIB =  ranlib
18 RM = rm -f
19
20 ZLIBLIB = $(WXDIR)/lib/libzlib.a
21 PNGLIB  = $(WXDIR)/lib/libpng.a
22 JPEGLIB = $(WXDIR)/lib/libjpeg.a
23 TIFFLIB = $(WXDIR)/lib/libtiff.a
24
25 include $(CONFIG)
26
27 ######################## Additional Flags section ############################
28
29 # Directories list for header files
30 INCLUDEDIRS += -I$(WXDIR)/include
31 # Defines for preprocessor
32 DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
33
34 # Compilation flags for C files OTHER than include directories
35 CFLAGS +=
36 # Preprocessor flags OTHER than defines
37 CPPFLAGS += 
38 # Linking flags
39 #LDFLAGS += -lwx -L$(WXDIR)/lib
40 LDFLAGS += $(WXLIB)
41
42 ############################# targets section ################################
43
44 # If you want to create a library with the objects files, define the name here
45 LIBNAME =
46
47 # If we put it below OBJS=, Makefile.rules includes .depend
48 # and it continually looks for .c files to satisfy .o.cpp
49 # dependency. What's going on there?
50 include $(TOP)/Makefile.rules
51
52 # List of objects to compile
53 OBJS = minimal.o
54 MTESTOBJS = mtest.o
55
56 all: minimal
57
58 ######################### Makefile.rules section #############################
59
60
61
62 ######################## Tools targets section ###############################
63
64 minimal: $(OBJS) $(MWINLIBS) $(WXLIB) $(TOP)/config
65         $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(WXLIB) $(MWINLIBS) -lm
66
67 mtest: $(MTESTOBJS) $(MWINLIBS) $(TOP)/config
68         $(CC) $(CFLAGS) $(LDFLAGS) $(MTESTOBJS) -o $@ $(MWINLIBS)
69
70 #.SUFFIXES: .cpp .cxx .c
71
72 #.c.o:
73 #       $(CC) -c $(CFLAGS) $(CFLAGS) -o $@ $*.c
74
75 .cxx.o:
76         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cxx
77
78 .cpp.o:
79         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $*.cpp
80
81 #$(COMMDIR)/appcmn.o:    $(COMMDIR)/appcmn.cpp
82 #       $(CC) -c $(CPPFLAGS) -o $@ $*.cpp
83
84 #appcmn.o:      $(COMMDIR)/appcmn.cpp
85 #       $(CC) $(CPPFLAGS) -c -o $@ $<
86
87 cleanwx:
88         -$(RM) *.o
89         -$(RM) minimal
90
91 wx:
92         @pushd $(WXDIR)/src/msw; make -f makefile.mic all; popd
93
94 wxfull:
95         @pushd $(WXDIR)/src/msw; make -f makefile.mic cleanwx all; popd