makefile.msc 1.37 KB
Newer Older
Hans Breuer's avatar
Hans Breuer committed
1 2 3 4
TOP = ..
PRJ_TOP = .
PACKAGE = gimp
PKG_VER = 1.3
Hans Breuer's avatar
Hans Breuer committed
5
!INCLUDE $(TOP)\glib\build\win32\make.msc
Hans Breuer's avatar
Hans Breuer committed
6 7

# in required build order
Hans Breuer's avatar
Hans Breuer committed
8 9 10 11 12 13 14
# ./themes gets extra handling below
SUBDIRS = \
	libgimpbase \
	libgimpcolor \
	libgimpmath \
	libgimpwidgets \
	libgimp \
Hans Breuer's avatar
Hans Breuer committed
15
#	libgimptool \
16
	libgimpmodule \
Hans Breuer's avatar
Hans Breuer committed
17 18
	regexrepl \
	app \
19
#	plug-ins \
Hans Breuer's avatar
Hans Breuer committed
20
	modules
Hans Breuer's avatar
Hans Breuer committed
21 22 23 24 25 26

sub-all: 
	for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc sub-one THIS=%d

sub-one:
	cd $(THIS)
27
	nmake -nologo -f makefile.msc $(TARGET)
Hans Breuer's avatar
Hans Breuer committed
28 29
	cd ..

30 31 32 33 34
clean :: sub-clean

sub-clean:
	for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc sub-one THIS=%d TARGET=clean

Hans Breuer's avatar
Hans Breuer committed
35 36 37 38 39
sub-themes:
	cd themes\Default\images
	nmake -nologo -f makefile.msc
	cd ....

Hans Breuer's avatar
Hans Breuer committed
40 41
all : \
	$(PRJ_TOP)\config.h \
Hans Breuer's avatar
Hans Breuer committed
42
	sub-themes \
Hans Breuer's avatar
Hans Breuer committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
	sub-all

$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
	copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h

RESOURCE = $(PACKAGE).res

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

$(PACKAGE)-$(PKG_VER).dll : $(PKG_LINK) $(OBJECTS) $(PACKAGE).def
	$(CC) $(CFLAGS) -LD -Fe$(PACKAGE)-$(PKG_VER).dll $(OBJECTS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:$(PACKAGE).def

$(PACKAGE).exe : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res
	$(CC) $(CFLAGS) -Fe$(PACKAGE).exe $(PACKAGE).res $(OBJECTS) $(PKG_LINK) \
	user32.lib advapi32.lib shell32.lib wsock32.lib winspool.lib $(LDFLAGS) /def:$(PACKAGE).def

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