File: makefile.msc

package info (click to toggle)
gimp 2.6.10-1%2Bsqueeze4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 128,948 kB
  • ctags: 55,327
  • sloc: ansic: 635,142; lisp: 10,678; sh: 10,420; makefile: 9,729; python: 3,366; perl: 2,713; xml: 1,152; yacc: 554; lex: 339
file content (929 lines) | stat: -rw-r--r-- 23,149 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# Makefile to build the GIMP plug-ins with Microsoft nmake and compiler

# I don't want to use many hand-written makefiles, so this is quite complex.
# This same makefile is also included by sub-makes called as subroutines.
# Various parts of this file are used when makeing from the plug-ins directory,
# and when building individual plug-ins and the three plug-in libraries.

INSTALL = copy

# This is what I use as installation target, from where the installer-builder
# will pick it up.
GIMP = C:\install\gimp

BIN = $(GIMP)\plug-ins

!IFNDEF GIMPTOP
GIMPTOP = ..
!ENDIF

TOP = ..\$(GIMPTOP)
!INCLUDE $(TOP)\glib\build\win32\make.msc
!INCLUDE $(GIMPTOP)\gimpdefs.msc

!IFNDEF LIBRARY
!IFNDEF PLUGIN
!IFNDEF MODULE

# This part is used when making from the plug-ins directory

FROMPLUGINSDIR=YES		# Used to bypass other parts below

# List plug-ins. We must use several lists to work around nmake's limits

# The COMMON* ones are in the common subdirectory
COMMON0 = alien-map align-layers animation-optimize animation-play antialias apply-canvas 
COMMON1 = blinds blur-gauss-selective blur-gauss blur-motion blur border-average bump-map 
COMMON2 = cartoon channel-mixer checkerboard cml-explorer color-cube-analyze color-enhance color-exchange color-to-alpha colorify colormap-remap compose contrast-normalize contrast-retinex contrast-stretch-hsv contrast-stretch convolution-matrix crop-auto crop-zealous cubism curve-bend 
COMMON3 = decompose deinterlace depth-merge despeckle destripe diffraction displace edge-dog edge-laplace edge-neon edge-sobel edge emboss engrave 
## file-aa file-mng file-pdf file-wmf file-xpm 
COMMON4 = file-cel file-compressor file-csource file-desktop-link file-dicom file-gbr file-gif-load file-gif-save file-gih file-glob file-header file-html-table file-pat file-pcx file-pix file-png file-pnm file-ps file-psp file-raw file-sunras file-svg file-tga file-tiff-load file-tiff-save file-xbm file-xwd film filter-pack fractal-trace 
## mail 
COMMON5 = gee-zoom gee gradient-map grid guillotine hot illusion iwarp jigsaw lcms lens-apply lens-distortion lens-flare max-rgb mosaic newsprint nl-filter noise-hsv noise-randomize noise-rgb noise-solid noise-spread nova oilify photocopy pixelize plasma plugin-browser polar-coords procedure-browser qbist red-eye-removal ripple rotate 
COMMON6 = sample-colorize screenshot semi-flatten sharpen shift sinus smooth-palette softglow sparkle sphere-designer 
COMMON7 = threshold-alpha tile-glass tile-paper tile-seamless tile-small tile unit-editor unsharp-mask value-invert value-propagate van-gogh-lic video warp waves web-browser whirl-pinch wind 

# These have own subdirectories each
SEPARATE = lighting gfig gimpressionist imagemap maze metadata pagecurl twain print help
## help-browser 
SEPARATE_DASH = color-rotate file-bmp file-faxg3 file-fits file-fli file-ico file-jpeg file-psd file-sgi file-uri file-xjt fractal-explorer gradient-flare ifs-compose map-object selection-to-path win-snap

# These are unofficial, ie not in the CVS. To build these, you should
# get tml's source snapshot and copy this makefile to the
# ..\unofficial-plug-ins directory, go there, and do "nmake -f makefile.msc unofficial".

UNOFFICIAL = Anamorphose DigitalSignature RGB_Displace gimp_ace guash sel_gauss magiceye user_filter

# The main target

all : ..\config.h libs-all common-plugins-all separate-plugins-all

..\config.h : ..\config.h.win32
	copy ..\config.h.win32 ..\config.h

install : libs-install common-plugins-install separate-plugins-install data-install

unofficial:
	for %d in ($(UNOFFICIAL)) do nmake -nologo -f makefile.msc sub-one-separate DIR=%d TARGET=install

clean :: libs-clean common-plugins-clean separate-plugins-clean

libs-all :
	@nmake -nologo -f makefile.msc sub-libs TARGET=all

libs-install :
	@nmake -nologo -f makefile.msc sub-libs TARGET=install

libs-clean :
	@nmake -nologo -f makefile.msc sub-libs TARGET=clean

sub-libs:
	cd script-fu\tinyscheme
	nmake -nologo -f ..\..\makefile.msc GIMPTOP=..\..\.. EXTRACFLAGS="-DWIN32 -DUSE_MATH -DUSE_INTERFACE -DSTANDALONE=0" \
		MODULE=tinyscheme OBJECTS="dynload.obj scheme.obj" $(TARGET)
	cd ..\..
	cd script-fu\ftx
	nmake -nologo -f ..\..\makefile.msc GIMPTOP=..\..\.. EXTRACFLAGS="-DWIN32 -I.. -DUSE_INTERFACE" \
		MODULE=ftx OBJECTS="ftx.obj" EXTRA_EXPORT=/export:init_ftx $(TARGET)
	cd ..\..

common-plugins-all :
	@nmake -nologo -f makefile.msc sub-common-plugins TARGET=all

common-plugins-install :
	@nmake -nologo -f makefile.msc sub-common-plugins TARGET=install

common-plugins-clean :
	@nmake -nologo -f makefile.msc sub-one-common TARGET=clean



sub-common-plugins :
	for %d in ($(COMMON0)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
	for %d in ($(COMMON1)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
	for %d in ($(COMMON2)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
	for %d in ($(COMMON3)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
	for %d in ($(COMMON4)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
	for %d in ($(COMMON5)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
	for %d in ($(COMMON6)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)
	for %d in ($(COMMON7)) do nmake -nologo -f makefile.msc sub-one-common DIR=%d TARGET=$(TARGET)

sub-one-common :
	@cd common
	@nmake -nologo -f ..\makefile.msc GIMPTOP=..\.. PLUGIN=$(DIR) $(TARGET)



separate-plugins-all :
	@nmake -nologo -f makefile.msc sub-separate-plugins TARGET=all

separate-plugins-install :
	@nmake -nologo -f makefile.msc sub-separate-plugins TARGET=install

separate-plugins-clean :
	@nmake -nologo -f makefile.msc sub-separate-plugins TARGET=clean



sub-separate-plugins :
	for %d in ($(SEPARATE)) do nmake -nologo -f makefile.msc sub-one-separate DIR=%d TARGET=$(TARGET)
	for %d in ($(SEPARATE_DASH)) do nmake -nologo -f makefile.msc sub-one-separate-dash DIR=%d TARGET=$(TARGET)


sub-one-separate :
	cd $(DIR)
	nmake -nologo -f ..\makefile.msc GIMPTOP=..\.. PLUGIN=$(DIR) EXTRA_$(DIR)=1 $(TARGET)

sub-one-separate-dash :
	cd $(DIR)
	nmake -nologo -f ..\makefile.msc GIMPTOP=..\.. PLUGIN=$(DIR) $(TARGET)

data-install : gimpressionist-data-install guash-data-install
	-md $(GIMP)\scripts
	$(INSTALL) script-fu\scripts\*.scm $(GIMP)\scripts
	$(INSTALL) script-fu\scripts\*.jpg $(GIMP)\scripts
	$(INSTALL) FractalExplorer\fractalexplorer-examples\* $(GIMP)\fractalexplorer
	del $(GIMP)\fractalexplorer\Makefile.am

gimpressionist-data-install :
	-md $(GIMP)\gimpressionist
	-md $(GIMP)\gimpressionist\Brushes
	-md $(GIMP)\gimpressionist\Paper
	-md $(GIMP)\gimpressionist\Presets
	$(INSTALL) gimpressionist\Brushes\*.pgm $(GIMP)\gimpressionist\Brushes
	$(INSTALL) gimpressionist\Brushes\*.ppm $(GIMP)\gimpressionist\Brushes
	$(INSTALL) gimpressionist\Paper\*.pgm $(GIMP)\gimpressionist\Paper
	$(INSTALL) gimpressionist\Presets\* $(GIMP)\gimpressionist\Presets
	del $(GIMP)\gimpressionist\Presets\Makefile.am

guash-data-install :


!ENDIF
!ENDIF
!ENDIF

!IFNDEF FROMPLUGINSDIR

# This part is used when building individual plug-ins or one of
# the libraries. 

# If a plug-in has several object files, or needs extra libraries or
# compiler flags, these are in an EXTRA_xxx part.

!IF "$(DIR)"=="color-rotate"
STOCK_IMAGES = \
	images/color-rotate-360.png \
	images/color-rotate-a-b.png \
	images/color-rotate-ccw.png \
	images/color-rotate-cw.png \

STOCK_VARS = \
	color_rotate_360 images/color-rotate-360.png \
	color_rotate_a_b images/color-rotate-a-b.png \
	color_rotate_ccw images/color-rotate-ccw.png \
	color_rotate_cw images/color-rotate-cw.png \

images/color-rotate-stock-pixbufs.h: $(STOCK_IMAGES)
	gdk-pixbuf-csource --rle --build-list $(STOCK_VARS) > images/color-rotate-stock-pixbufs.h

EXTRA_DEPS = images/color-rotate-stock-pixbufs.h

OBJECTS = \
	color-rotate-callbacks.obj \
	color-rotate-dialog.obj \
	color-rotate-draw.obj \
	color-rotate-stock.obj \
	color-rotate-utils.obj \
	color-rotate.obj \

!ENDIF

!IF "$(DIR)"=="fractal-explorer"
OBJECTS = \
	fractal-explorer-dialogs.obj \
	fractal-explorer.obj
!ENDIF

!IFDEF EXTRA_lighting
STOCK_VARS = \
	stock_intensity_ambient_high images/stock-intensity-ambient-high.png	\
	stock_intensity_ambient_low images/stock-intensity-ambient-low.png		\
	stock_intensity_diffuse_high images/stock-intensity-diffuse-high.png	\
	stock_intensity_diffuse_low images/stock-intensity-diffuse-low.png		\
	stock_reflectivity_diffuse_high images/stock-reflectivity-diffuse-high.png	\
	stock_reflectivity_diffuse_low images/stock-reflectivity-diffuse-low.png	\
	stock_reflectivity_specular_high images/stock-reflectivity-specular-high.png	\
	stock_reflectivity_specular_low images/stock-reflectivity-specular-low.png	\
	stock_reflectivity_highlight_high images/stock-reflectivity-highlight-high.png	\
	stock_reflectivity_highlight_low images/stock-reflectivity-highlight-low.png

STOCK_IMAGES = \
	images/stock-intensity-ambient-high.png	\
	images/stock-intensity-ambient-low.png		\
	images/stock-intensity-diffuse-high.png	\
	images/stock-intensity-diffuse-low.png		\
	images/stock-reflectivity-diffuse-high.png	\
	images/stock-reflectivity-diffuse-low.png	\
	images/stock-reflectivity-specular-high.png	\
	images/stock-reflectivity-specular-low.png	\
	images/stock-reflectivity-highlight-high.png	\
	images/stock-reflectivity-highlight-low.png

images/stock-pixbufs.h: $(STOCK_IMAGES)
	gdk-pixbuf-csource --rle --build-list $(STOCK_VARS) > images/stock-pixbufs.h

EXTRA_DEPS = images/stock-pixbufs.h

OBJECTS = \
	lighting-apply.obj \
	lighting-image.obj \
	lighting-main.obj \
	lighting-preview.obj \
	lighting-shade.obj \
	lighting-stock.obj \
	lighting-ui.obj
!ENDIF

!IF "$(DIR)"=="map-object"
OBJECTS = \
	arcball.obj \
	map-object-apply.obj \
	map-object-image.obj \
	map-object-main.obj \
	map-object-preview.obj \
	map-object-shade.obj \
	map-object-ui.obj
OPTIMIZE =
!ENDIF

!IF "$(DIR)"=="file-bmp"
OBJECTS = \
	bmp.obj \
	bmp-read.obj \
	bmp-write.obj
!ENDIF

!IFDEF EXTRA_plugindetails
OBJECTS = \
	gimpprocbox.obj \
	gimpprocbrowser.obj \
	gimpprocview.obj \
	plugin-browser.obj
!ENDIF

!IF "$(DIR)"=="file-faxg3"
OBJECTS = \
	faxg3.obj \
	g3.obj
!ENDIF

!IF "$(DIR)"=="file-fits"
OBJECTS = \
	fits.obj \
	fits-io.obj
!ENDIF

!IFDEF EXTRA_flame
OBJECTS = \
	cmap.obj \
	flame.obj \
	libifs.obj \
	rect.obj
!ENDIF

!IF "$(DIR)"=="file-fli"
OBJECTS = \
	fli.obj \
	fli-gimp.obj
!ENDIF

!IFDEF EXTRA_gfig
STOCK_VARS = \
	stock_bezier images/stock-bezier.png	\
	stock_circle images/stock-circle.png	\
	stock_copy_object images/stock-copy-object.png	\
	stock_curve images/stock-curve.png		\
	stock_delete_object images/stock-delete-object.png	\
	stock_ellipse images/stock-ellipse.png	\
	stock_line images/stock-line.png		\
	stock_move_object images/stock-move-object.png	\
	stock_move_point images/stock-move-point.png	\
	stock_polygon images/stock-polygon.png	\
	stock_rectangle images/stock-rectangle.png	\
	stock_spiral images/stock-spiral.png	\
	stock_star images/stock-star.png		\
	stock_select_object images/stock-select-object.png \
	stock_show_all images/stock-show-all.png

STOCK_IMAGES = \
	images/stock-bezier.png	\
	images/stock-circle.png	\
	images/stock-copy-object.png	\
	images/stock-curve.png		\
	images/stock-delete-object.png	\
	images/stock-ellipse.png	\
	images/stock-line.png		\
	images/stock-move-object.png	\
	images/stock-move-point.png	\
	images/stock-polygon.png	\
	images/stock-spiral.png	\
	images/stock-star.png		\
	images/stock-logo.png

images/gfig-stock-pixbufs.h: $(STOCK_IMAGES)
	gdk-pixbuf-csource --rle --build-list $(STOCK_VARS) > images/gfig-stock-pixbufs.h

EXTRA_DEPS = images/gfig-stock-pixbufs.h

OBJECTS = \
	gfig.obj \
	gfig-arc.obj \
	gfig-bezier.obj \
	gfig-circle.obj \
	gfig-dialog.obj \
	gfig-dobject.obj \
	gfig-ellipse.obj \
	gfig-grid.obj \
	gfig-line.obj \
	gfig-poly.obj \
	gfig-preview.obj \
	gfig-rectangle.obj \
	gfig-spiral.obj \
	gfig-star.obj \
	gfig-style.obj \
	gfig-stock.obj
!ENDIF

!IF "$(DIR)"=="ifs-compose"
OBJECTS = \
	ifs-compose.obj \
	ifs-compose-storage.obj \
	ifs-compose-utils.obj
!ENDIF

!IFDEF EXTRA_imagemap
STOCK_VARS = \
        stock_circle            images/stock-circle.png        \
        stock_coord             images/stock-coord.png \
        stock_dimension         images/stock-dimension.png     \
        stock_java              images/stock-java.png  \
        stock_polygon           images/stock-polygon.png       \
        stock_rectangle         images/stock-rectangle.png     \
        stock_to_back           images/stock-to-back.png       \
        stock_to_front          images/stock-to-front.png      \

STOCK_IMAGES = \
        images/stock-circle.png        \
        images/stock-coord.png \
        images/stock-dimension.png     \
        images/stock-java.png  \
        images/stock-polygon.png       \
        images/stock-rectangle.png     \
        images/stock-to-back.png       \
        images/stock-to-front.png      \


images/imap-stock-pixbufs.h: $(STOCK_IMAGES)
	gdk-pixbuf-csource --rle --build-list $(STOCK_VARS) > images/imap-stock-pixbufs.h

EXTRA_DEPS = images/imap-stock-pixbufs.h

OBJECTS = \
	imap_cmd_copy_object.obj \
	imap_about.obj \
	imap_browse.obj \
	imap_cern_lex.obj \
	imap_cern_parse.obj \
	imap_circle.obj \
	imap_cmd_clear.obj \
	imap_cmd_copy.obj \
	imap_cmd_create.obj \
	imap_cmd_cut.obj \
	imap_cmd_cut_object.obj \
	imap_cmd_delete.obj \
	imap_cmd_delete_point.obj \
	imap_cmd_edit_object.obj \
	imap_cmd_gimp_guides.obj \
	imap_cmd_guides.obj \
	imap_cmd_insert_point.obj \
	imap_cmd_move.obj \
	imap_cmd_move_down.obj \
	imap_cmd_move_sash.obj \
	imap_cmd_move_selected.obj \
	imap_cmd_move_to_front.obj \
	imap_cmd_move_up.obj \
	imap_cmd_object_down.obj \
	imap_cmd_object_move.obj \
	imap_cmd_object_up.obj \
	imap_cmd_paste.obj \
	imap_cmd_select.obj \
	imap_cmd_select_all.obj \
	imap_cmd_select_next.obj \
	imap_cmd_select_prev.obj \
	imap_cmd_select_region.obj \
	imap_cmd_send_to_back.obj \
	imap_cmd_unselect.obj \
	imap_cmd_unselect_all.obj \
	imap_command.obj \
	imap_csim_lex.obj \
	imap_csim_parse.obj \
	imap_default_dialog.obj \
	imap_edit_area_info.obj \
	imap_file.obj \
	imap_grid.obj \
	imap_main.obj \
	imap_menu.obj \
	imap_menu_funcs.obj \
	imap_misc.obj \
	imap_mru.obj \
	imap_ncsa_lex.obj \
	imap_ncsa_parse.obj \
	imap_object.obj \
	imap_object_popup.obj \
	imap_polygon.obj \
	imap_preferences.obj \
	imap_preview.obj \
	imap_rectangle.obj \
	imap_selection.obj \
	imap_settings.obj \
	imap_source.obj \
	imap_statusbar.obj \
	imap_stock.obj \
	imap_string.obj \
	imap_table.obj \
	imap_taglist.obj
# not changing the source which is lexed
EXTRACFLAGS = -FIstring.h -FIstdlib.h -DYY_NO_UNISTD_H
!ENDIF

!IFDEF EXTRA_iwarp
OPTIMIZE =
!ENDIF

!IF "$(DIR)"=="file-ico"
EXTRACFLAGS = $(PNG_CFLAGS)
EXTRALIBS = $(PNG_LIBS)
OBJECTS = \
	ico-dialog.obj \
	ico-load.obj \
	ico-save.obj \
	ico.obj
!ENDIF

!IF "$(DIR)"=="file-jpeg"
EXTRACFLAGS = -I$(JPEG) \
!IFDEF EXIF
	$(EXIF_CFLAGS) -DHAVE_EXIF -DHAVE_EXIF_0_6
!ENDIF

EXTRALIBS = \
	$(JPEG)\libjpeg.lib \
!IFDEF EXIF
	$(EXIF_LIBS)
!ENDIF

OBJECTS = \
	jpeg.obj \
	jpeg-exif.obj \
	jpeg-icc.obj \
	jpeg-load.obj \
	jpeg-quality.obj \
	jpeg-save.obj \
	jpeg-settings.obj \
!IFDEF EXIF
	gimpexif.obj
!ENDIF

!ENDIF

!IF "$(DIR)"=="file-uri"
OBJECTS = \
	gimpmountoperation.obj \
#	uri-backend-gnomevfs.obj \
	uri-backend-gvfs.obj \
#	uri-backend-libcurl.obj \
#	uri-backend-wget.obj \
	uri.obj
!ENDIF

!IF "$(DIR)"=="lcms"
EXTRACFLAGS = $(LCMS_CFLAGS)
EXTRALIBS = $(LCMS_LIBS)
!ENDIF

!IFDEF EXTRA_maze
OBJECTS = \
	maze-algorithms.obj \
	maze-dialog.obj \
	maze-utils.obj \
	maze.obj \

!ENDIF

!IFDEF EXTRA_mpeg
EXTRACFLAGS = -I$(MPEG)
EXTRALIBS = $(MPEG)\release\libmpeg.lib
!ENDIF

!IFDEF EXTRA_metadata
OBJECTS = \
	base64.obj \
	interface.obj \
	metadata.obj \
	xmp-encode.obj \
	xmp-model.obj \
	xmp-parse.obj \
	xmp-schemas.obj
!ENDIF

!IFDEF EXTRA_pagecurl
STOCK_VARS = \
        curl0 curl0.png \
        curl1 curl1.png \
        curl2 curl2.png \
        curl3 curl3.png \
        curl4 curl4.png \
        curl5 curl5.png \
        curl6 curl6.png \
        curl7 curl7.png \

STOCK_IMAGES = \
        curl0.png \
        curl1.png \
        curl2.png \
        curl3.png \
        curl4.png \
        curl5.png \
        curl6.png \
        curl7.png \

pagecurl-icons.h: $(STOCK_IMAGES)
	gdk-pixbuf-csource --rle --build-list $(STOCK_VARS) > pagecurl-icons.h

EXTRA_DEPS = pagecurl-icons.h

!ENDIF

!IF "$(DIR)"=="file-png"
EXTRACFLAGS = $(PNG_CFLAGS)
EXTRALIBS = $(PNG_LIBS)
!ENDIF

!IFDEF EXTRA_print
OBJECTS = \
	print.obj \
	print-draw-page.obj \
	print-page-layout.obj \
	print-preview.obj \
	print-settings.obj \
	print-page-setup.obj \
	print-utils.obj \

EXTRALIBS = $(CAIRO_LIBS) $(GTHREAD_LIBS)
!ENDIF

!IF "$(DIR)"=="file-psp"
EXTRACFLAGS = $(ZLIB_CFLAGS)
EXTRALIBS = $(ZLIB_LIBS)
!ENDIF

!IF "$(DIR)"=="file-psd"
EXTRACFLAGS = $(TIFF_CFLAGS) $(JPEG_CFLAGS)
EXTRALIBS = $(TIFF_LIBS) $(JPEG)\libjpeg.lib $(ZLIB_LIBS) user32.lib
OBJECTS = \
	psd-image-res-load.obj \
	psd-layer-res-load.obj \
	psd-load.obj \
#2nd!	psd-save.obj \
	psd-thumb-load.obj \
	psd-util.obj \
	psd.obj
!ENDIF

!IF "$(DIR)"=="screenshot"
EXTRALIBS = user32.lib
!ENDIF

!IF "$(DIR)"=="script-fu"
OBJECTS = \
	scheme-wrapper.obj \
	script-fu.obj \
	script-fu-console.obj \
	script-fu-scripts.obj \
	script-fu-text-console.obj \
	script-fu-interface.obj \
	script-fu-server.obj \
	script-fu-eval.obj \
	script-fu-regex.obj \
	script-fu-script.obj \
	script-fu-utils.obj \

EXTRALIBS = tinyscheme\tinyscheme.lib ftx\ftx.lib kernel32.lib wsock32.lib
EXTRACFLAGS = -DREGEX_MALLOC -DUSE_INTERFACE -DSTANDALONE=0
#HAVE_RESOURCE = YES
!ENDIF

!IF "$(DIR)"=="selection-to-path"
OBJECTS = \
	curve.obj \
	edge.obj \
	fit.obj \
	math.obj \
	pxl-outline.obj \
	spline.obj \
	selection-to-path-dialog.obj \
	selection-to-path.obj \
	spline.obj \
	vector.obj \

!ENDIF

!IF "$(DIR)"=="file-sgi"
OBJECTS = \
	sgi.obj \
	sgi-lib.obj
!ENDIF

!IF "$(DIR)"=="file-svg"
EXTRACFLAGS = $(RSVG_CFLAGS)
EXTRALIBS = $(RSVG_LIBS)
!ENDIF

!IF "$(DIR)"=="file-tiff-load" || "$(DIR)"=="file-tiff-save"
EXTRACFLAGS = $(TIFF_CFLAGS)
EXTRALIBS = $(TIFF_LIBS) $(JPEG)\libjpeg.lib $(ZLIB_LIBS) user32.lib
!ENDIF

!IFDEF EXTRA_gimp_ace
EXTRACFLAGS = -DGLACE_GIMP
OBJECTS = \
	gimp_ace.obj \
	glace.obj \
	glaceG.obj
!ENDIF

!IFDEF EXTRA_gimpressionist

EXTRALIBS = $(GTK2_LIBS)

OBJECTS = \
	brush.obj \
	color.obj \
	general.obj \
	gimp.obj \
	gimpressionist.obj \
	globals.obj \
	orientation.obj \
	orientmap.obj \
	paper.obj \
	placement.obj \
	plasma.obj \
	ppmtool.obj \
	presets.obj \
	preview.obj \
	repaint.obj \
	size.obj \
	sizemap.obj \
	utils.obj
!ENDIF

!IFDEF EXTRA_help
OBJECTS = \
	gimphelp.obj \
	gimphelpdomain.obj \
	gimphelpitem.obj \
	gimphelplocale.obj \
	gimphelpprogress.obj \
	help.obj \

TEST_OBJECTS = \
	gimp-help-lookup.obj
!ENDIF

!IFDEF EXTRA_helpbrowser
OBJECTS = \
	gimpthrobber.obj \
	gimpthrobberaction.obj \
	helpbrowser.obj	\
	dialog.obj	\
	queue.obj		\
	uri.obj
EXTRACFLAGS = $(GTKHTML2_CFLAGS)
EXTRALIBS = $(GTKHTML2_LIBS) user32.lib shell32.lib

dialog.c : logo-pixbuf.h

logo-pixbuf.h: wilber-reading.png
	gdk-pixbuf-csource --raw --name=logo_data wilber-reading.png > logo-pixbuf.h

!ENDIF

!IFDEF EXTRA_guash
HAVE_RESOURCE = YES
!ENDIF

!IFDEF EXTRA_magiceye
OBJECTS = \
	dialog.obj \
	magiceye.obj
!ENDIF

!IFDEF EXTRA_user_filter

uf_lexer.c : uf_lexer.l
	flex -Cem -ouf_lexer.c uf_lexer.l
uf_parser.tab.c: uf_parser.y
	bison --defines --verbose uf_parser.y

OBJECTS = \
	libyywrap.obj \
	uf_eval.obj \
	uf_file.obj \
	uf_gui.obj \
	uf_lexer.obj \
	uf_main.obj \
	uf_parser.tab.obj
!ENDIF

!IFDEF EXTRA_pmosaic
EXTRACFLAGS = -I$(JPEG)
EXTRALIBS = $(JPEG)\libjpeg.lib
OBJECTS = \
	pmosaic.obj \
	pmsc.obj
!ENDIF

!IFDEF EXTRA_twain
OBJECTS = \
	tw_func.obj \
	tw_util.obj \
!IFDEF DEBUG
	tw_dump.obj \
!ENDIF
	tw_win.obj \
	twain.obj
EXTRALIBS = user32.lib
!ENDIF

!IF "$(DIR)"=="web-browser"
EXTRALIBS = shell32.lib user32.lib
!ENDIF

!IFDEF EXTRA_winprint
EXTRALIBS = user32.lib gdi32.lib comdlg32.lib
!ENDIF

!IFDEF EXTRA_winclipboard
EXTRALIBS = user32.lib
!ENDIF

!IFDEF EXTRA_winicon
EXTRACFLAGS = $(PNG_CFLAGS)
EXTRALIBS = $(PNG_LIBS)
OBJECTS = \
	icodialog.obj \
	icoload.obj \
	icosave.obj \
	main.obj
!ENDIF

!IF "$(DIR)"=="win-snap"
OBJECTS = winsnap.obj
#HAVE_RESOURCE = YES
RESOURCE = winsnap.res
EXTRALIBS = user32.lib gdi32.lib
!ENDIF

!IF "$(DIR)"=="file-xjt"
OBJECTS = \
	xjt.obj \
	xjpeg.obj
EXTRACFLAGS = $(JPEG_CFLAGS)
EXTRALIBS = $(JPEG_LIBS)
!ENDIF

PLUGINDIR = $(GIMPTOP)\plug-ins

!IFNDEF OPTIMIZE
!IFNDEF DEBUG
OPTIMIZE = -Ox
!ELSE
OPTIMIZE = -Zi
!ENDIF
!ENDIF

!IFNDEF DEBUG
LINKDEBUG =
RTL = -MD
!ELSE
LINKDEBUG = /debug
RTL = -MDd
!ENDIF

CC = cl -nologo -GF $(OPTIMIZE) $(RTL) -W2 -Zm400

CFLAGS = -FImsvc_recommended_pragmas.h \
	-DHAVE_CONFIG_H \
	-DLOCALEDIR=\"?\" \
	-I$(GIMPTOP) -I. -I$(PLUGINDIR) \
	$(EXTRACFLAGS) \
	$(GTK2_CFLAGS) $(INTL_CFLAGS)

LDFLAGS = /link /subsystem:console /machine:ix86 $(LINKDEBUG) /NODEFAULTLIB:LIBC

!IFDEF PLUGIN

# This part is used when building individual plug-ins

all : $(PLUGIN).exe

install : all
	$(INSTALL) $(PLUGIN).exe $(BIN)

!IFNDEF OBJECTS
OBJECTS = $(PLUGIN).obj
!ENDIF

!IFDEF HAVE_RESOURCE
# We have our own resource file (just an icon, usually)
RESOURCE = $(PLUGIN).res
!ELSE
# Use the Wilber icon otherwise. If gimp.exe eventually gets more resources,
# this will have to be changed.
RESOURCE = ..\..\app\gimp.res
!ENDIF

$(PLUGIN).exe :  $(EXTRA_DEPS) $(OBJECTS) $(RESOURCE)
	$(CC) $(CFLAGS) -Fe$(PLUGIN).exe $(OBJECTS) $(RESOURCE) \
	..\..\libgimp\gimp-$(GIMP_VER).lib ..\..\libgimp\gimpui-$(GIMP_VER).lib \
	..\..\libgimpbase\gimpbase-$(GIMP_VER).lib \
	..\..\libgimpcolor\gimpcolor-$(GIMP_VER).lib \
	..\..\libgimpconfig\gimpconfig-$(GIMP_VER).lib \
	..\..\libgimpmath\gimpmath-$(GIMP_VER).lib \
	..\..\libgimpwidgets\gimpwidgets-$(GIMP_VER).lib \
	$(GLIB_LIBS) $(GTK2_LIBS) $(INTL_LIBS) $(EXTRALIBS) $(LDFLAGS)

$(PLUGIN).res : $(PLUGIN).rc
	rc -r -fo $(PLUGIN).res $(PLUGIN).rc

!ENDIF

!IFDEF LIBRARY

# This part is used when building a library

all : $(LIBRARY).lib

install : all

!IFNDEF OBJECTS
OBJECTS = $(LIBRARY).obj
!ENDIF

$(LIBRARY).lib : $(OBJECTS)
	lib /out:$(LIBRARY).lib $(OBJECTS)

!ENDIF

!IFDEF MODULE

# This part is used when building a module

# Allow building libraries with specific extensions
!IFNDEF MODULE_EXT
MODULE_EXT = dll
!ELSE
EXTRA_EXPORT = /export:init$(MODULE)
!ENDIF

all : $(MODULE).$(MODULE_EXT)

install : all

!IFNDEF OBJECTS
OBJECTS = $(MODULE).obj
!ENDIF

$(MODULE).$(MODULE_EXT) : $(OBJECTS)
	$(CC) $(CFLAGS) -LD -Fe$@ $(OBJECTS) $(LDFLAGS) $(EXTRALIBS) \
	$(GIMPTOP)\libgimp\gimp-$(GIMP_VER).lib \
	$(GIMPTOP)\libgimp\gimpui-$(GIMP_VER).lib \
	$(GIMPTOP)\libgimpcolor\gimpcolor-$(GIMP_VER).lib \
	$(GIMPTOP)\libgimpbase\gimpbase-$(GIMP_VER).lib \
	$(GIMPTOP)\libgimpwidgets\gimpwidgets-$(GIMP_VER).lib \
	$(GLIB_LIBS) $(GTK2_LIBS) $(INTL_LIBS) $(EXTRA_EXPORT)
!ENDIF

.c.obj :
	$(CC) $(CFLAGS) -c $<

clean ::
	erase *.obj
	erase *.lib
	erase *.exp
	erase *.exe
	erase *.pdb
	erase *.ilk

!ENDIF