70 lines
2.1 KiB
Makefile
70 lines
2.1 KiB
Makefile
# DVX Shell Makefile for DJGPP cross-compilation
|
|
#
|
|
# Builds dvxshell.lib -- the shell module loaded by the DVX loader.
|
|
|
|
DJGPP_PREFIX = $(HOME)/djgpp/djgpp
|
|
CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc
|
|
DXE3GEN = PATH=$(DJGPP_PREFIX)/bin:$(PATH) DJDIR=$(DJGPP_PREFIX)/i586-pc-msdosdjgpp $(DJGPP_PREFIX)/i586-pc-msdosdjgpp/bin/dxe3gen
|
|
CFLAGS = -O2 -Wall -Wextra -march=i486 -mtune=i586 -I../core -I../core/platform -I../widgets -I../tasks -I../core/thirdparty
|
|
|
|
OBJDIR = ../obj/shell
|
|
LIBSDIR = ../bin/libs
|
|
CONFIGDIR = ../bin/config
|
|
THEMEDIR = ../bin/config/themes
|
|
WPAPERDIR = ../bin/config/wpaper
|
|
|
|
SRCS = shellMain.c shellApp.c shellExport.c shellInfo.c shellTaskMgr.c
|
|
OBJS = $(patsubst %.c,$(OBJDIR)/%.o,$(SRCS))
|
|
TARGET = $(LIBSDIR)/dvxshell.lib
|
|
|
|
.PHONY: all clean
|
|
|
|
THEMES = $(THEMEDIR)/geos.thm $(THEMEDIR)/win31.thm $(THEMEDIR)/cde.thm
|
|
WPAPERS = $(WPAPERDIR)/blueglow.jpg $(WPAPERDIR)/swoop.jpg $(WPAPERDIR)/triangle.jpg
|
|
|
|
all: $(TARGET) $(LIBSDIR)/dvxshell.dep $(CONFIGDIR)/dvx.ini $(THEMES) $(WPAPERS)
|
|
|
|
$(LIBSDIR)/dvxshell.dep: ../config/dvxshell.dep | $(LIBSDIR)
|
|
sed 's/$$/\r/' $< > $@
|
|
|
|
$(TARGET): $(OBJS) | $(LIBSDIR)
|
|
$(DXE3GEN) -o $(LIBSDIR)/dvxshell.dxe -E _shell -U $(OBJS)
|
|
mv $(LIBSDIR)/dvxshell.dxe $@
|
|
|
|
$(CONFIGDIR)/dvx.ini: ../config/dvx.ini | $(CONFIGDIR)
|
|
sed 's/$$/\r/' $< > $@
|
|
|
|
$(OBJDIR)/%.o: %.c | $(OBJDIR)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
$(OBJDIR):
|
|
mkdir -p $(OBJDIR)
|
|
|
|
$(LIBSDIR):
|
|
mkdir -p $(LIBSDIR)
|
|
|
|
$(CONFIGDIR):
|
|
mkdir -p $(CONFIGDIR)
|
|
|
|
$(THEMEDIR):
|
|
mkdir -p $(THEMEDIR)
|
|
|
|
$(THEMEDIR)/%.thm: ../config/themes/%.thm | $(THEMEDIR)
|
|
sed 's/$$/\r/' $< > $@
|
|
|
|
$(WPAPERDIR):
|
|
mkdir -p $(WPAPERDIR)
|
|
|
|
$(WPAPERDIR)/%.jpg: ../config/wpaper/%.jpg | $(WPAPERDIR)
|
|
cp $< $@
|
|
|
|
# Dependencies
|
|
$(OBJDIR)/shellMain.o: shellMain.c shellApp.h
|
|
$(OBJDIR)/shellApp.o: shellApp.c shellApp.h
|
|
$(OBJDIR)/shellExport.o: shellExport.c shellApp.h
|
|
$(OBJDIR)/shellInfo.o: shellInfo.c shellInfo.h shellApp.h
|
|
$(OBJDIR)/shellTaskMgr.o: shellTaskMgr.c shellTaskMgr.h shellApp.h
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(TARGET) $(LIBSDIR)/dvxshell.dep
|
|
rm -rf $(WPAPERDIR) $(THEMEDIR) $(CONFIGDIR)
|