42 lines
1.5 KiB
Makefile
42 lines
1.5 KiB
Makefile
# List Help Library Makefile for DJGPP cross-compilation
|
|
#
|
|
# Builds listhelp.lib -- shared list/dropdown helper infrastructure
|
|
# (dropdown arrow, item length, keyboard navigation, popup list painting).
|
|
|
|
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 -Werror -Wno-type-limits -Wno-sign-compare -Wno-format-truncation -march=i486 -mtune=i586 -I. -I../core -I../core/platform -I../tasks -I../core/thirdparty
|
|
|
|
OBJDIR = ../obj/listhelp
|
|
LIBSDIR = ../bin/libs
|
|
|
|
SRCS = listHelp.c
|
|
OBJS = $(patsubst %.c,$(OBJDIR)/%.o,$(SRCS))
|
|
TARGET = $(LIBSDIR)/listhelp.lib
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(TARGET) $(LIBSDIR)/listhelp.dep
|
|
|
|
$(LIBSDIR)/listhelp.dep: ../config/listhelp.dep | $(LIBSDIR)
|
|
sed 's/$$/\r/' $< > $@
|
|
|
|
$(TARGET): $(OBJS) | $(LIBSDIR)
|
|
$(DXE3GEN) -o $(LIBSDIR)/listhelp.dxe -E _widgetDraw -E _widgetDropdown -E _widgetMax -E _widgetNavigate -E _widgetPaint -U $(OBJS)
|
|
mv $(LIBSDIR)/listhelp.dxe $@
|
|
|
|
$(OBJDIR)/%.o: %.c | $(OBJDIR)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
$(OBJDIR):
|
|
mkdir -p $(OBJDIR)
|
|
|
|
$(LIBSDIR):
|
|
mkdir -p $(LIBSDIR)
|
|
|
|
# Dependencies
|
|
$(OBJDIR)/listHelp.o: listHelp.c listHelp.h ../core/dvxWidgetPlugin.h ../core/dvxWidget.h ../core/dvxTypes.h ../core/dvxApp.h ../core/dvxDraw.h ../core/dvxWm.h ../core/dvxVideo.h
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(TARGET) $(LIBSDIR)/listhelp.dep
|